<?php

declare(strict_types=1);

namespace apexl\Io\modules\menu\interfaces;

use apexl\Io\modules\menu\dto\MenuMetadata;
use apexl\Io\modules\user\interfaces\PermissionInterface;

interface HasMenuEntryInterface
{
    /**
     * Construction-free menu metadata, derived from the class (typically via the
     * #[MenuEntry] attribute). Read this at route/menu build time so no entity
     * needs to be instantiated; the instance getters below are deprecated shims.
     */
    public static function menuMetadata(): MenuMetadata;

    /** @deprecated Use the static menuMetadata()->route (see MenuMetadata / HasMenuEntry). */
    public function menuRoute(): string;

    /** @deprecated Use the static menuMetadata()->name. */
    public function menuName(): string;

    /** @deprecated Use the static menuMetadata()->icon. */
    public function menuIcon(): string;

    /** @deprecated Use the static menuMetadata()->weight. */
    public function menuWeight(): int;

    /** @deprecated Use the static menuMetadata()->pattern. */
    public function menuPattern(): string;

    /**
     * @return PermissionInterface|PermissionInterface[]
     * @deprecated Use the static menuMetadata()->permission.
     */
    public function menuPermission(): PermissionInterface|array;

}
