<?php

namespace App\Filament\Resources\Shifts\Schemas;

use Filament\Forms\Components\TextInput;
use Filament\Forms\Components\Textarea;
use Filament\Forms\Components\TimePicker;
use Filament\Forms\Components\Toggle;
use Filament\Schemas\Schema;

class ShiftForm
{
    public static function configure(Schema $schema): Schema
    {
        return $schema
            ->components([
            TimePicker::make('starts_at')
                ->label(__('hr.fields.starts_at'))
                ->required()
                ->seconds(false),
            TimePicker::make('ends_at')
                ->label(__('hr.fields.ends_at'))
                ->required()
                ->seconds(false),

                TextInput::make('name')
                    ->label(__('hr.fields.name'))
                    ->required()
                    ->maxLength(255),

                Textarea::make('description')
                    ->label(__('hr.fields.description'))
                    ->rows(3),
                
                    Toggle::make('is_active')
                    ->label(__('hr.fields.active'))
                    ->default(true)
                    ->required(),
            ]);
    }
}
