<?php

declare(strict_types=1);

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

use apexl\Io\modules\tabulator\Interfaces\HasTabulatorViewInterface;

final readonly class UniqueArrayValues extends ArrayValues
{
    public function __invoke(HasTabulatorViewInterface $entity, string $field): array
    {
        $values = parent::__invoke($entity, $field);

        return array_values(array_unique($values));
    }
}
