<?php

declare(strict_types=1);

namespace App\Filament\Concerns;

trait HasTranslatedLabels
{
    /** Navigation / plural key under admin.nav and admin.models, e.g. articles */
    abstract protected static function navKey(): string;

    /** Singular model key under admin.models, e.g. article */
    abstract protected static function modelKey(): string;

    /** Group key under admin.groups: content|system|plugins */
    protected static function groupKey(): string
    {
        return 'content';
    }

    public static function getNavigationLabel(): string
    {
        return __('admin.nav.'.static::navKey());
    }

    public static function getModelLabel(): string
    {
        return __('admin.models.'.static::modelKey());
    }

    public static function getPluralModelLabel(): string
    {
        return __('admin.models.'.static::navKey());
    }

    public static function getNavigationGroup(): ?string
    {
        return __('admin.groups.'.static::groupKey());
    }
}
