<?php

declare(strict_types=1);

namespace App\Filament\Resources\Categories\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 CategoriesTable
{
    public static function configure(Table $table): Table
    {
        return $table
            ->columns([
                \App\Filament\Components\Table\TitleTextColumn::create(),
                \App\Filament\Components\Table\SlugTextColumn::create(),
                \App\Filament\Components\Table\ModelTypeTextColumn::create(),
                \App\Filament\Components\Table\OrderTextColumn::create(),
                \App\Filament\Components\Table\UrlTextColumn::create(),
                \App\Filament\Components\Table\IconImageColumn::create(),
                \App\Filament\Components\Table\MetaTitleTextColumn::create(),
                \App\Filament\Components\Table\MetaKeywordsTextColumn::create(),
                \App\Filament\Components\Table\PageTitleTextColumn::create(),
                \App\Filament\Components\Table\LevelTextColumn::create(),
                \App\Filament\Components\Table\CreatedByTextColumn::create(),
                \App\Filament\Components\Table\UpdatedByTextColumn::create(),
                \App\Filament\Components\Table\DeletedAtTextColumn::create(),
                \App\Filament\Components\Table\CreatedAtTextColumn::create(),
                \App\Filament\Components\Table\UpdatedAtTextColumn::create(),
                \App\Filament\Components\Table\ParentTextColumn::create(),
                \App\Filament\Components\Table\RootTextColumn::create(),
            ])
            ->filters([
                TrashedFilter::make(),
            ])
            ->recordActions([
                EditAction::make(),
            ])
            ->toolbarActions([
                BulkActionGroup::make([
                    DeleteBulkAction::make(),
                    ForceDeleteBulkAction::make(),
                    RestoreBulkAction::make(),
                ]),
            ]);
    }
}
