<?php

namespace App\Filament\Resources\Master\Courses;

use App\Filament\Resources\Master\Courses\Pages\ManageCourses;
use App\Filament\Resources\Master\Courses\Schemas\CourseForm;
use App\Filament\Resources\Master\Courses\Tables\CoursesTable;
use App\Models\Course;
use BackedEnum;
use Filament\Resources\Resource;
use Filament\Schemas\Schema;
use Filament\Tables\Table;
use UnitEnum;

class CourseResource extends Resource
{
    protected static ?string $model = Course::class;

    protected static string|UnitEnum|null $navigationGroup = 'Master';

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

    protected static ?string $navigationLabel = 'Mata Kuliah';

    protected static ?int $navigationSort = 10;

    protected static ?string $slug = 'master/courses';

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

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

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