<?php

declare(strict_types=1);

namespace App\Filament\Components\Table;

use Filament\Tables\Columns\TextColumn;

class MetaKeywordsTextColumn extends TextColumn
{
    public static function create(): static
    {
        return parent::make('meta_keywords')
            ->label('کلمات کلیدی')
            ->sortable()
            ->listWithLineBreaks()
            ->getStateUsing(fn ($record) => $record->meta_keywords ?? [])
            ->toggleable()
            ->toggledHiddenByDefault();
    }
}
