import { ApplicationDefinition, ContainerItem, UIWidget, Widget } from '../contracts/fusion';
import { Dictionary, ICommand, IInvokeUrlCommand, ISearchCommand } from '../common';
import { UIItem, CommandDef, WebLayout } from '../contracts/weblayout';
export declare function isUIWidget(widget: any): widget is UIWidget;
/**
 *
 */
export interface ToolbarConf {
    items: (IFlyoutSpec | ISeparatorSpec | IUnknownCommandSpec | ICommandSpec)[];
}
/**
 *
 */
export interface PreparedSubMenuSet {
    toolbars: Dictionary<ToolbarConf>;
    flyouts: Dictionary<IFlyoutSpec>;
}
/**
 * @hidden
 */
export declare function isFlyoutSpec(item: any): item is IFlyoutSpec;
/**
 *
 */
export interface IFlyoutSpec {
    label?: string;
    tooltip?: string;
    icon?: string;
    spriteClass?: string;
    children: (IFlyoutSpec | ISeparatorSpec | IUnknownCommandSpec | ICommandSpec)[];
}
/**
 *
 */
export interface ISeparatorSpec {
    isSeparator: boolean;
}
/**
 *
 */
export interface IUnknownCommandSpec {
    error: string;
}
/**
 *
 */
export interface ICommandSpec {
    icon: string;
    spriteClass: string;
    label: string | null;
    tooltip: string;
    parameters: any;
    command?: string;
    componentName?: string;
    flyoutId?: string;
}
/**
 * @hidden
 *
 * @param isStateless
 * @param items
 * @param widgetsByKey
 * @param locale
 * @param noToolbarLabels
 * @returns
 */
export declare function convertFlexLayoutUIItems(isStateless: boolean, items: ContainerItem[], widgetsByKey: Dictionary<Widget>, locale: string, noToolbarLabels?: boolean): (IFlyoutSpec | ISeparatorSpec | IUnknownCommandSpec | ICommandSpec)[];
/**
 * @hidden
 *
 * @param items
 * @param cmdsByKey
 * @param locale
 * @param noToolbarLabels
 * @returns
 */
export declare function convertWebLayoutUIItems(items: UIItem[] | undefined, cmdsByKey: Dictionary<CommandDef>, locale: string, noToolbarLabels?: boolean): (IFlyoutSpec | ISeparatorSpec | IUnknownCommandSpec | ICommandSpec)[];
export declare type CommandRegistrationFunc = (name: string, cmdDef: ICommand | IInvokeUrlCommand | ISearchCommand) => void;
export declare function parseWidgetsInAppDef(appDef: ApplicationDefinition, cmdRegister: CommandRegistrationFunc): {
    taskPane: Widget | undefined;
    viewSize: Widget | undefined;
    initialTask: string;
    hasLegend: boolean;
    hasStatus: boolean;
    hasNavigator: boolean;
    hasSelectionPanel: boolean;
    hasTaskBar: boolean;
    isStateless: boolean;
    widgetsByKey: Dictionary<Widget>;
};
export declare function parseCommandsInWebLayout(webLayout: WebLayout, cmdRegister: CommandRegistrationFunc): Dictionary<CommandDef>;
/**
 * @hidden
 *
 * @param tbConf
 * @returns
 */
export declare function prepareSubMenus(tbConf: Dictionary<ToolbarConf>): [PreparedSubMenuSet, boolean];
