<?php

declare(strict_types=1);

namespace App\Filament\Components\Form;

use App\Models\Survey;
use Filament\Forms\Components\Select;

class SurveySelect extends Select
{
    public static function create(): static
    {
        return parent::make('survey_id')
            ->label('نظرسنجی')
            ->label('نظرسنجی')
            ->options(function () {
                return Survey::all()->pluck('title', 'id');
            })
            ->required()
            ->columnSpan(3);
    }
}
