<?php

declare(strict_types=1);

namespace App\Filament\Resources\AdminMessages;

use App\Filament\Resources\AdminMessages\Pages\ListAdminMessages;
use App\Models\AdminMessage;
use BackedEnum;
use Filament\Resources\Resource;
use Filament\Tables\Table;
use UnitEnum;

class AdminMessageResource extends Resource
{
    protected static ?string $model = AdminMessage::class;

    protected static string|BackedEnum|null $navigationIcon = 'heroicon-o-envelope';

    protected static ?string $navigationLabel = 'پیام‌ها';

    protected static ?string $modelLabel = 'پیام';

    protected static ?string $pluralModelLabel = 'پیام‌ها';

    protected static string|null|UnitEnum $navigationGroup = 'پشتیبانی';

    public static function table(Table $table): Table
    {
        return \App\Filament\Resources\AdminMessages\Tables\AdminMessagesTable::configure($table);
    }

    public static function getPages(): array
    {
        return [
            'index' => ListAdminMessages::route('/'),
        ];
    }
}
