<?php

declare(strict_types=1);

namespace App\Filament\Components\Table;

use Filament\Tables\Columns\TextColumn;

class ModelTypeTextColumn extends TextColumn
{
    public static function create(): static
    {
        return parent::make('model_type')
            ->label('نوع مدل')
            ->sortable()
            ->getStateUsing(fn ($record) => __(substr(strrchr($record->model_type, '\\'), 1)))
            ->toggleable()
            ->toggledHiddenByDefault();
    }
}
