<?php

namespace App\Filament\Resources\CarouselSlides\Tables;

use Filament\Actions\BulkActionGroup;
use Filament\Actions\DeleteBulkAction;
use Filament\Actions\EditAction;
use Filament\Tables\Columns\IconColumn;
use Filament\Tables\Columns\ImageColumn;
use Filament\Tables\Columns\TextColumn;
use Filament\Tables\Table;

class CarouselSlidesTable
{
    public static function configure(Table $table): Table
    {
        return $table
            ->columns([
                ImageColumn::make('image')
                    ->label('Surat'),
                TextColumn::make('title')
                    ->label('Sözbaşy')
                    ->searchable(),
                TextColumn::make('subtitle')
                    ->label('Sözbaşy asty')
                    ->searchable(),
                TextColumn::make('order')
                    ->label('Tertibi')
                    ->numeric()
                    ->sortable(),
                IconColumn::make('is_active')
                    ->label('Işjeňmi')
                    ->boolean(),
                TextColumn::make('created_at')
                    ->label('Döredilen wagty')
                    ->dateTime()
                    ->sortable()
                    ->toggleable(isToggledHiddenByDefault: true),
                TextColumn::make('updated_at')
                    ->label('Üýtgedilen wagty')
                    ->dateTime()
                    ->sortable()
                    ->toggleable(isToggledHiddenByDefault: true),
            ])
            ->filters([
                //
            ])
            ->recordActions([
                EditAction::make(),
            ])
            ->toolbarActions([
                BulkActionGroup::make([
                    DeleteBulkAction::make(),
                ]),
            ]);
    }
}
