<?php

declare(strict_types=1);

namespace App\Filament\Components\Form;

use App\Filament\Support\SelectOptionLabels;

use Filament\Forms\Components\Select;

class BreedSelect extends Select
{
    public static function create(): static
    {
        return parent::make('breed_id')
            ->label('نژاد')
            ->relationship('breed', 'name')
            ->getOptionLabelFromRecordUsing(fn ($record) => SelectOptionLabels::generic($record, 'name', 'نژاد'))
            ->searchable(['name'])
            ->preload()
            ->columnSpan(6);
    }
}

