<?php

declare(strict_types=1);

namespace apexl\Io\modules\tabulator\Tabulatable\RowFormatter;

use apexl\Io\modules\tabulator\Dto\RowFormatterDto\ContentTabulatorRowFormatterDto;

/**
 * Applies styles to row if the cell content matches
 * Tests with delimited with '/' will be treated as Regexp, otherwise an exact match is required
 *
 * $dto->withRowFormatter(ContentRowFormatter::class, [
 *     new ContentRowFormatterDto(test: 'Knapen', styles: ['fontWeight' => 'bold'])
 *     new ContentRowFormatterDto(test: '/^KBF/', styles: ['color' => 'blue'])
 * ])
 */
readonly class ContentRowFormatter extends RowFormatter
{
    protected function dtoClass(): string
    {
        return ContentTabulatorRowFormatterDto::class;
    }
}