<?php

namespace App\Filament\Resources\PhotoGeoData;

use App\Filament\Resources\PhotoGeoData\Pages\CreatePhotoGeoData;
use App\Filament\Resources\PhotoGeoData\Pages\EditPhotoGeoData;
use App\Filament\Resources\PhotoGeoData\Pages\ListPhotoGeoData;
use App\Filament\Resources\PhotoGeoData\Schemas\PhotoGeoDataForm;
use App\Filament\Resources\PhotoGeoData\Tables\PhotoGeoDataTable;
use App\Models\PhotoGeoData;
use BackedEnum;
use Filament\Resources\Resource;
use Filament\Schemas\Schema;
use Filament\Support\Icons\Heroicon;
use Filament\Tables\Table;
use Illuminate\Database\Eloquent\Builder;

class PhotoGeoDataResource extends Resource
{
    protected static ?string $model = PhotoGeoData::class;

    protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedRectangleStack;

    public static function form(Schema $schema): Schema
    {
        return PhotoGeoDataForm::configure($schema);
    }

    public static function table(Table $table): Table
    {
        return PhotoGeoDataTable::configure($table);
    }

    public static function shouldRegisterNavigation(): bool
    {
        // Only show in the sidebar if the user is an admin
        return auth()->user()?->role === 'admin';
    }
   

    public static function getNavigationIcon(): string
    {
        return 'heroicon-o-plus-circle'; // Your symbol for the left menu
    }


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

    public static function getPages(): array
    {
        return [
            'index' => ListPhotoGeoData::route('/'),
            'create' => CreatePhotoGeoData::route('/create'),
            'edit' => EditPhotoGeoData::route('/{record}/edit'),
        ];
    }
}
