/** @packageDocumentation * @module Backstage */ import { BadgeType } from "../items/BadgeType"; import { ConditionalBooleanValue } from "../items/ConditionalBooleanValue"; import { ConditionalStringValue } from "../items/ConditionalStringValue"; import { ProvidedItem } from "../items/ProvidedItem"; /** Used to specify the item type added to the backstage menu. * @public */ export declare enum BackstageItemType { /** Item that executes an action function */ ActionItem = 1, /** Item that activate a stage. */ StageLauncher = 2 } /** Describes the data needed to insert a button into the backstage menu. * @public */ export interface CommonBackstageItem extends ProvidedItem { /** can be used by application to store miscellaneous data. */ applicationData?: any; /** Describes badge. Renders no badge if not specified. */ readonly badgeType?: BadgeType; /** Specifies the item's grouping value. Items are sorted by group and then item priority. When * group priority changes a separator is inserted. It is recommended using values 10 through 100, incrementing by 10. This * allows extensions enough gaps to insert their own groups. */ readonly groupPriority: number; /** Name of icon WebFont entry or if specifying an SVG symbol added by plug on use "svg:" prefix to imported symbol Id. */ readonly icon?: string | ConditionalStringValue; /** Required unique id of the item. To ensure uniqueness it is suggested that a namespace prefix of the extension name be used. */ readonly id: string; /** optional data to be used by item implementor. */ readonly internalData?: Map; /** Describes if the item is visible or hidden. The default is for the item to be visible. */ readonly isHidden?: boolean | ConditionalBooleanValue; /** Describes if the item is enabled or disabled. The default is for the item to be enabled. */ readonly isDisabled?: boolean | ConditionalBooleanValue; /** Priority within a group (recommend using values 1 through 100). */ readonly itemPriority: number; /** Label. */ readonly label: string | ConditionalStringValue; /** Subtitle. */ readonly subtitle?: string | ConditionalStringValue; /** Tooltip. */ readonly tooltip?: string | ConditionalStringValue; /** Describes if the item is active. The default is for the item to be active if stageId matches activeFrontstageId */ readonly isActive?: boolean | ConditionalBooleanValue; } /** Describes the data needed to insert an action button into the backstage menu. * @public */ export interface BackstageActionItem extends CommonBackstageItem { readonly execute: () => void; } /** Describes the data needed to insert an action button into the backstage menu. * @public */ export interface BackstageStageLauncher extends CommonBackstageItem { readonly stageId: string; } /** Describes the data needed to insert a button into the backstage menu. * @public */ export declare type BackstageItem = BackstageActionItem | BackstageStageLauncher; /** BackstageActionItem type guard. * @public */ export declare const isActionItem: (item: BackstageItem) => item is BackstageActionItem; /** BackstageStageLauncher type guard. * @public */ export declare const isStageLauncher: (item: BackstageItem) => item is BackstageStageLauncher; /** Utilities for creating and maintaining backstage items * @public */ export declare class BackstageItemUtilities { /** Creates a stage launcher backstage item */ static createStageLauncher: (frontstageId: string, groupPriority: number, itemPriority: number, label: string | ConditionalStringValue, subtitle?: string | ConditionalStringValue | undefined, icon?: string | ConditionalStringValue | undefined, overrides?: Partial | undefined) => BackstageStageLauncher; /** Creates an action backstage item */ static createActionItem: (itemId: string, groupPriority: number, itemPriority: number, execute: () => void, label: string | ConditionalStringValue, subtitle?: string | ConditionalStringValue | undefined, icon?: string | ConditionalStringValue | undefined, overrides?: Partial | undefined) => BackstageActionItem; } //# sourceMappingURL=BackstageItem.d.ts.map