<?php

namespace App\Filament\Admin\Resources;

use App\Filament\Admin\Resources\TaxResource\Pages;
use App\Models\Tax;
use Filament\Forms\Form;
use Filament\Resources\Resource;
use Filament\Tables;
use Filament\Tables\Table;

class TaxResource extends Resource
{
    //    protected static ?string $model = Tax::class;

    protected static ?string $navigationLabel = 'Service Tax';

    protected static ?string $navigationIcon = 'lucide-circle-dollar-sign';

    protected static ?string $navigationGroup = 'Settings';

    protected static ?int $navigationSort = 11;

    public static function form(Form $form): Form
    {
        return $form
            ->schema([
                //
            ]);
    }

    public static function table(Table $table): Table
    {
        return $table
            ->columns([
                //
            ])
            ->filters([
                //
            ])
            ->actions([
                Tables\Actions\EditAction::make(),
            ])
            ->bulkActions([
                Tables\Actions\BulkActionGroup::make([
                    Tables\Actions\DeleteBulkAction::make(),
                ]),
            ]);
    }

    public static function canAccess(): bool
    {
        return auth()->user()->is_admin;
    }

    public static function getRelations(): array
    {
        return [
            //
        ];
    }

    public static function getPages(): array
    {
        return [
            'index'  => Pages\ListTaxes::route('/'),
            'create' => Pages\CreateTax::route('/create'),
            'edit'   => Pages\EditTax::route('/{record}/edit'),
        ];
    }
}
