import type { EntityBaseProperties } from "../Entity.js";
import { EntityBase } from "../Entity.js";
import type { Action } from "../support/Action.js";
import type { PropertyDefs } from "../support/Serializable.js";
import type { MenuProperties } from "./Menu.js";
import { Menu } from "./Menu.js";
import type { MenuItemState } from "./MenuItemState.js";
import type { MenuItemFactory } from "./support/MenuItemFactory.js";
/**
 * Properties that can be passed into the constructor for
 * {@link menus/MenuItem!MenuItem}.
 */
export interface MenuItemProperties extends EntityBaseProperties {
    /**
     * See {@link menus/MenuItem!MenuItem.iconId}.
     */
    iconId?: string;
    /**
     * See {@link menus/MenuItem!MenuItem.title}.
     */
    title?: string;
    /**
     * See {@link menus/MenuItem!MenuItem.description}.
     */
    description?: string;
    /**
     * See {@link menus/MenuItem!MenuItem.isEnabled}.
     */
    isEnabled?: boolean;
    /**
     * See {@link menus/MenuItem!MenuItem.isToggled}.
     */
    isToggled?: boolean;
    /**
     * See {@link menus/MenuItem!MenuItem.hideOnDisable}.
     */
    hideOnDisable?: boolean;
    /**
     * See {@link menus/MenuItem!MenuItem.action}.
     */
    action?: Action;
    /**
     * See {@link menus/MenuItem!MenuItem.alternate}.
     */
    alternate?: MenuItemState;
    /**
     * See {@link menus/MenuItem!MenuItem.submenu}.
     */
    submenu?: Menu | MenuProperties;
}
/**
 * An item within a {@link menus/Menu!Menu}.
 */
export declare class MenuItem<TMenuItemProps extends MenuItemProperties = MenuItemProperties, TMenuProps extends MenuProperties = MenuProperties> extends EntityBase<TMenuItemProps> implements MenuItemState {
    /**
     * The factory that will be used whenever a new menu item needs to be
     * created. Applications can supply their own factory to customize menu item
     * creation.
     */
    static factory: MenuItemFactory;
    /**
     * @inheritDoc
     */
    protected readonly _itemType: string;
    protected _isToggled: boolean;
    private _submenu;
    private _iconId;
    private _isEnabled;
    private _description;
    private _title;
    private _hideOnDisable;
    private _action;
    private _alternate;
    constructor(props?: TMenuItemProps);
    /**
     * Determines whether this item supports toggling.
     */
    get canBeToggled(): boolean;
    /**
     * Determines whether this item is currently toggled from its initial state.
     * This property is only meaningful if
     * {@link menus/MenuItem!MenuItem.canBeToggled} is true. When this property
     * is changed, other properties of the menu item will be swapped with those
     * in "alternate". An item can only be toggled if it has an alternate
     * state.
     */
    get isToggled(): boolean;
    /**
     * A submenu associated with this item.
     */
    get submenu(): Menu<TMenuItemProps, TMenuProps, this>;
    set submenu(value: Menu<TMenuItemProps, TMenuProps, this>);
    /**
     * The parent menu that this item belongs to.
     */
    get menu(): Menu<TMenuItemProps, TMenuProps, this>;
    /**
     * The root menu in the menu hierarchy.
     */
    get root(): Menu<TMenuItemProps, TMenuProps, this>;
    /**
     * The ID of the icon to show for this item, e.g. "gcx-icon-zoom-in".
     */
    get iconId(): string;
    set iconId(value: string);
    /**
     * The human-readable caption for the item.
     */
    get title(): string;
    set title(value: string);
    /**
     * A longer description explaining what the item does, typically displayed
     * in a tooltip.
     */
    get description(): string;
    set description(value: string);
    /**
     * Determines whether the user is able to select this item.
     */
    get isEnabled(): boolean;
    set isEnabled(value: boolean);
    /**
     * Determines whether the item should be hidden when
     * {@link menus/MenuItem!MenuItem.isEnabled} is set to false. The default is
     * false.
     */
    get hideOnDisable(): boolean;
    set hideOnDisable(value: boolean);
    /**
     * Indicates which action to perform when this item is selected.
     */
    get action(): Action;
    set action(value: Action);
    /**
     * The alternate state to set when the menu item is toggled.
     */
    get alternate(): MenuItemState | undefined;
    set alternate(value: MenuItemState | undefined);
    /**
     * Creates the appropriate subclass of {@link menus/MenuItem!MenuItem} based
     * on the supplied properties. Applications can customize the default
     * creation behavior by supplying a custom factory object (see
     * {@link menus/MenuItem!MenuItem.factory}).
     *
     * @param properties The menu item properties.
     */
    static create<TMenuItemProps extends MenuItemProperties = MenuItemProperties>(properties: TMenuItemProps): MenuItem;
    /**
     * Swaps the current properties for those in "alternate". If there is no
     * alternate state then an error will be thrown.
     */
    toggle(): void;
    protected _onInitialize(): Promise<void>;
    protected _getSerializableProperties(): PropertyDefs<TMenuItemProps>;
    /**
     * Checks if any {@link menus/Menu!Menu}s in a collection are ancestors of a
     * given {@link menus/Menu!Menu}.
     *
     * @param submenus Collections of {@link menus/Menu!Menu}s.
     * @param currentMenu The current ancestor being checked.
     * @param rootMenu The root of the menu hierarchy.
     */
    private _createsCircularReference;
    /**
     * Generates a collection of all {@link menus/Menu!Menu}s beneath a given
     * {@link menus/Menu!Menu} in the menu hierarchy.
     *
     * @param menu The {@link menus/Menu!Menu}.
     */
    private _allSubmenus;
}
