<?php

namespace App\Filament\Resources\DeliverySchedules\Schemas;

use Filament\Schemas\Components\Grid;
use Filament\Schemas\Components\Section;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Components\Toggle;
use Filament\Schemas\Schema;

class DeliveryScheduleForm
{
    public static function configure(Schema $schema): Schema
    {
        return $schema
            ->components([
                Section::make('Sablon adatai')
                    ->columnSpanFull()
                    ->schema([
                        Grid::make(2)
                            ->schema([
                                TextInput::make('name')
                                    ->label('Sablon neve')
                                    ->required()
                                    ->maxLength(255),
                                Toggle::make('is_active')
                                    ->label('Aktív')
                                    ->default(true),
                            ]),
                        Section::make('Szállítási napok')
                            ->columns(7)
                            ->schema([
                                Toggle::make('monday')->label('Hétfő')->default(false),
                                Toggle::make('tuesday')->label('Kedd')->default(false),
                                Toggle::make('wednesday')->label('Szerda')->default(false),
                                Toggle::make('thursday')->label('Csütörtök')->default(false),
                                Toggle::make('friday')->label('Péntek')->default(false),
                                Toggle::make('saturday')->label('Szombat')->default(false),
                                Toggle::make('sunday')->label('Vasárnap')->default(false),
                            ]),
                    ]),
            ]);
    }
}
