<?php

namespace App\Filament\Resources\SupportConversations;

use App\Filament\Resources\SupportConversations\Pages\CreateSupportConversation;
use App\Filament\Resources\SupportConversations\Pages\EditSupportConversation;
use App\Filament\Resources\SupportConversations\Pages\ListSupportConversations;
use App\Filament\Resources\SupportConversations\Pages\ViewSupportConversation;
use App\Filament\Resources\SupportConversations\Schemas\SupportConversationForm;
use App\Filament\Resources\SupportConversations\Schemas\SupportConversationInfolist;
use App\Filament\Resources\SupportConversations\Tables\SupportConversationsTable;
use App\Models\SupportConversation;
use BackedEnum;
use UnitEnum;
use Filament\Resources\Resource;
use Filament\Schemas\Schema;
use Filament\Support\Icons\Heroicon;
use Filament\Tables\Table;

class SupportConversationResource extends Resource
{
    protected static ?string $model = SupportConversation::class;

    protected static string|BackedEnum|null $navigationIcon = 'heroicon-o-chat-bubble-left-right';
    protected static string|UnitEnum|null $navigationGroup = 'Conversion Engine';
    protected static ?int $navigationSort = 10;

    protected static ?string $recordTitleAttribute = 'email_phone';

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

    public static function infolist(Schema $schema): Schema
    {
        return SupportConversationInfolist::configure($schema);
    }

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

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

    public static function getPages(): array
    {
        return [
            'index' => ListSupportConversations::route('/'),
            'create' => CreateSupportConversation::route('/create'),
            'view' => ViewSupportConversation::route('/{record}'),
            'edit' => EditSupportConversation::route('/{record}/edit'),
        ];
    }
}
