<?php

namespace App\Filament\Resources\DeliverySchedules\Tables;

use Filament\Actions\BulkActionGroup;
use Filament\Actions\DeleteBulkAction;
use Filament\Actions\EditAction;
use Filament\Actions\ForceDeleteBulkAction;
use Filament\Actions\RestoreBulkAction;
use Filament\Tables\Filters\TrashedFilter;
use Filament\Tables\Table;

class DeliverySchedulesTable
{
    public static function configure(Table $table): Table
    {
        return $table
            ->columns([
                \Filament\Tables\Columns\TextColumn::make('name')
                    ->label('Név')
                    ->searchable()
                    ->sortable(),
                \Filament\Tables\Columns\IconColumn::make('monday')->boolean()->label('H'),
                \Filament\Tables\Columns\IconColumn::make('tuesday')->boolean()->label('K'),
                \Filament\Tables\Columns\IconColumn::make('wednesday')->boolean()->label('Sze'),
                \Filament\Tables\Columns\IconColumn::make('thursday')->boolean()->label('Cs'),
                \Filament\Tables\Columns\IconColumn::make('friday')->boolean()->label('P'),
                \Filament\Tables\Columns\IconColumn::make('saturday')->boolean()->label('Szo'),
                \Filament\Tables\Columns\IconColumn::make('sunday')->boolean()->label('V'),
                \Filament\Tables\Columns\IconColumn::make('is_active')
                    ->boolean()
                    ->label('Aktív')
                    ->sortable(),
            ])
            ->filters([
                TrashedFilter::make(),
            ])
            ->recordActions([
                EditAction::make(),
            ])
            ->toolbarActions([
                BulkActionGroup::make([
                    DeleteBulkAction::make(),
                    ForceDeleteBulkAction::make(),
                    RestoreBulkAction::make(),
                ]),
            ]);
    }
}
