<?php

declare(strict_types=1);

namespace apexl\Io\modules\menu\dto;

use apexl\Io\modules\user\interfaces\PermissionInterface;

/**
 * Construction-free menu metadata for an entity. Read statically at route/menu
 * build time via HasMenuEntryInterface::menuMetadata() so the framework no longer
 * has to instantiate every entity just to enumerate its menu entry.
 */
final readonly class MenuMetadata
{
    /**
     * @param PermissionInterface|PermissionInterface[] $permission
     */
    public function __construct(
        public string $name,
        public string $route,
        public string $icon,
        public int $weight,
        public string $pattern,
        public PermissionInterface|array $permission,
    ) {}
}
