<?php

declare(strict_types=1);

namespace App\Filament\Resources\Wiki\Image\RelationManagers;

use App\Filament\RelationManagers\Wiki\StudioRelationManager;
use App\Models\Wiki\Image;
use App\Models\Wiki\Studio;
use Filament\Tables\Table;

class StudioImageRelationManager extends StudioRelationManager
{
    /**
     * The relationship the relation manager corresponds to.
     */
    protected static string $relationship = Image::RELATION_STUDIOS;

    public function table(Table $table): Table
    {
        return parent::table(
            $table
                ->inverseRelationship(Studio::RELATION_IMAGES)
        );
    }
}
