/** @packageDocumentation
 * @module Admin
 */
import * as React from "react";
import type { XAndY } from "@itwin/core-geometry";
import type { AbstractMenuItemProps, AbstractToolbarProps, DialogLayoutDataProvider, DialogProps, OnCancelFunc, OnItemExecutedFunc, OnNumberCommitFunc, OnValueCommitFunc, Primitives, PropertyDescription, PropertyRecord } from "@itwin/appui-abstract";
import { RelativePosition, UiAdmin } from "@itwin/appui-abstract";
import type { IMatch } from "../utils/matchesWords";
/** Controls whether localized and/or non-localized key-in strings appear in a KeyinField's auto-completion list.
 * @public
 */
export declare enum KeyinFieldLocalization {
    /** Include only non-localized key-in strings. */
    NonLocalized = 0,
    /** Include only localized key-in strings. */
    Localized = 1,
    /** Include localized and non-localized strings for each key-in. */
    Both = 2
}
/** Defines a keyin entry to show/filter in UI
 * @public
 */
export interface KeyinEntry {
    /** string that matched a filter string */
    value: string;
    /** define array of start and end positions of filter matches. */
    matches?: IMatch[];
    /** true if entry was loaded from key-in history */
    isHistory?: boolean;
}
/** Subclass of `UiAdmin` in `@itwin/core-frontend` to be used to initialize `IModelApp`.
 *
 * This implementation uses themed react components that blends in AppUI look and feel.
 *
 * ```ts
 * await IModelApp.startup({
 *   uiAdmin: new FrameworkUiAdmin()
 * });
 * ```
 * @public
 */
export declare class FrameworkUiAdmin extends UiAdmin {
    private _localizedKeyinPreference;
    get localizedKeyinPreference(): KeyinFieldLocalization;
    set localizedKeyinPreference(preference: KeyinFieldLocalization);
    /** @internal */
    onInitialized(): void;
    /** Gets the cursor X and Y position, which is mouseEvent.pageX and mouseEvent.pageY. */
    get cursorPosition(): XAndY;
    /** Determines if focus is set to Home */
    get isFocusOnHome(): boolean;
    /** Sets focus to Home */
    setFocusToHome(): void;
    /** Show a context menu at a particular location.
     * @param items Properties of the menu items to display.
     * @param location Location of the context menu, relative to the origin of htmlElement or the overall window.
     * @param htmlElement The HTMLElement that anchors the context menu. If undefined, the location is relative to the overall window.
     * @return true if the menu was displayed, false if the menu could not be displayed.
     */
    showContextMenu(items: AbstractMenuItemProps[], location: XAndY, htmlElement?: HTMLElement): boolean;
    /** Resolve location and parent element */
    private resolveHtmlElement;
    getKeyins(): KeyinEntry[];
    /** Show the Key-in Palette to display key-in from all registered Tools.
     * @param htmlElement The HTMLElement that anchors the Popup. If undefined, the location is relative to the overall window.
     * @return true if the Command Palette was displayed, false if it could not be displayed.
     */
    showKeyinPalette(htmlElement?: HTMLElement): boolean;
    /** Hides the Key-in Palette. */
    hideKeyinPalette(): boolean;
    /** Show a Toolbar at a particular location.
     * @param toolbarProps Properties of the Toolbar to display.
     * @param location Location of the Toolbar, relative to the origin of htmlElement or the overall window.
     * @param offset Offset of the Toolbar from the location.
     * @param onItemExecuted Function invoked after a Toolbar item is executed
     * @param onCancel Function invoked when the Escape key is pressed or a click occurs outside the Toolbar
     * @param relativePosition Position relative to the given location. Defaults to TopRight.
     * @param htmlElement The HTMLElement that anchors the Toolbar. If undefined, the location is relative to the overall window.
     * @return true if the Toolbar was displayed, false if the Toolbar could not be displayed.
     */
    showToolbar(toolbarProps: AbstractToolbarProps, location: XAndY, offset: XAndY, onItemExecuted: OnItemExecutedFunc, onCancel: OnCancelFunc, relativePosition?: RelativePosition, htmlElement?: HTMLElement): boolean;
    /** Hides the toolbar. */
    hideToolbar(): boolean;
    /** Show a menu button at a particular location. A menu button opens a context menu.
     * @param id Id of the menu button. Multiple menu buttons may be displayed.
     * @param menuItemsProps Properties of the menu items to display.
     * @param location Location of the context menu, relative to the origin of htmlElement or the window.
     * @param htmlElement The HTMLElement that anchors the context menu. If undefined, the location is relative to the overall window.
     * @return true if the menu was displayed, false if the menu could not be displayed.
     */
    showMenuButton(id: string, menuItemsProps: AbstractMenuItemProps[], location: XAndY, htmlElement?: HTMLElement): boolean;
    /** Hides a menu button.
     * @param id Id of the menu button. Multiple menu buttons may be displayed.
     * @return true if the menu was hidden, false if the menu could not be hidden.
     */
    hideMenuButton(id: string): boolean;
    /** Show a calculator at a particular location.
     * @param initialValue Value initially displayed in the calculator.
     * @param resultIcon Icon displayed to the left of the value.
     * @param location Location of the calculator, relative to the origin of htmlElement or the window.
     * @param onOk Function called when the OK button or the Enter key is pressed.
     * @param onCancel Function called when the Cancel button or the Escape key  is pressed.
     * @param htmlElement The HTMLElement that anchors the context menu. If undefined, the location is relative to the overall window.
     * @return true if the menu was displayed, false if the menu could not be displayed.
     */
    showCalculator(initialValue: number, resultIcon: string, location: XAndY, onOk: OnNumberCommitFunc, onCancel: OnCancelFunc, htmlElement?: HTMLElement): boolean;
    /** Hides the calculator. */
    hideCalculator(): boolean;
    /** Show an input editor for an angle value at a particular location.
     * @param initialValue Value initially displayed in the editor.
     * @param location Location of the editor, relative to the origin of htmlElement or the window.
     * @param onCommit Function called when the OK button or the Enter key is pressed.
     * @param onCancel Function called when the Cancel button or the Escape key  is pressed.
     * @param htmlElement The HTMLElement that anchors the context menu. If undefined, the location is relative to the overall window.
     * @return true if the editor was displayed, false if the editor could not be displayed.
     */
    showAngleEditor(initialValue: number, location: XAndY, onCommit: OnNumberCommitFunc, onCancel: OnCancelFunc, htmlElement?: HTMLElement): boolean;
    /** Show an input editor for a length value at a particular location.
     * @param initialValue Value initially displayed in the editor.
     * @param location Location of the editor, relative to the origin of htmlElement or the window.
     * @param onCommit Function called when the OK button or the Enter key is pressed.
     * @param onCancel Function called when the Cancel button or the Escape key  is pressed.
     * @param htmlElement The HTMLElement that anchors the context menu. If undefined, the location is relative to the overall window.
     * @return true if the editor was displayed, false if the editor could not be displayed.
     */
    showLengthEditor(initialValue: number, location: XAndY, onCommit: OnNumberCommitFunc, onCancel: OnCancelFunc, htmlElement?: HTMLElement): boolean;
    /** Show an input editor for a height value at a particular location.
     * @param initialValue Value initially displayed in the editor.
     * @param location Location of the editor, relative to the origin of htmlElement or the window.
     * @param onCommit Function called when the OK button or the Enter key is pressed.
     * @param onCancel Function called when the Cancel button or the Escape key  is pressed.
     * @param htmlElement The HTMLElement that anchors the context menu. If undefined, the location is relative to the overall window.
     * @return true if the editor was displayed, false if the editor could not be displayed.
     */
    showHeightEditor(initialValue: number, location: XAndY, onCommit: OnNumberCommitFunc, onCancel: OnCancelFunc, htmlElement?: HTMLElement): boolean;
    /** Show an input editor for a primitive value at a particular location.
     * @param initialValue Value initially displayed in the editor.
     * @param propertyDescription Description of the primitive value property
     * @param location Location of the editor, relative to the origin of htmlElement or the window.
     * @param onCommit Function called when the OK button or the Enter key is pressed.
     * @param onCancel Function called when the Cancel button or the Escape key  is pressed.
     * @param htmlElement The HTMLElement that anchors the context menu. If undefined, the location is relative to the overall window.
     * @return true if the editor was displayed, false if the editor could not be displayed.
     */
    showInputEditor(initialValue: Primitives.Value, propertyDescription: PropertyDescription, location: XAndY, onCommit: OnValueCommitFunc, onCancel: OnCancelFunc, htmlElement?: HTMLElement): boolean;
    /** Hides the input editor. */
    hideInputEditor(): boolean;
    /** Show an HTML element at a particular location.
     * @param displayElement The HTMLElement to display
     * @param location Location of the display element, relative to the origin of htmlElement or the window
     * @param offset Offset of the display element from the location
     * @param onCancel Function invoked when the Escape key is pressed or a click occurs outside the display element
     * @param relativePosition Position relative to the given location. Defaults to TopRight.
     * @param anchorElement The HTMLElement that anchors the display element. If undefined, the location is relative to the overall window.
     * @return true if the display element was displayed, false if the display element could not be displayed.
     */
    showHTMLElement(displayElement: HTMLElement, location: XAndY, offset: XAndY, onCancel: OnCancelFunc, relativePosition?: RelativePosition, anchorElement?: HTMLElement): boolean;
    /** Hides the HTML Element. */
    hideHTMLElement(): boolean;
    /** Show a Card containing content, a title and a toolbar at a particular location.
     * @param content The HTMLElement of the content to display
     * @param title Title to display at the top of the card.
     * @param toolbarProps Properties of the Toolbar to display.
     * @param location Location of the Card, relative to the origin of htmlElement or the window.
     * @param offset Offset of the Card from the location.
     * @param onItemExecuted Function invoked after a Toolbar item is executed
     * @param onCancel Function invoked when the Escape key is pressed or a click occurs outside the Card
     * @param relativePosition Position relative to the given location. Defaults to TopRight.
     * @param anchorElement The HTMLElement that anchors the Card. If undefined, the location is relative to the overall window.
     * @return true if the Card was displayed, false if the Card could not be displayed.
     */
    showCard(content: HTMLElement, title: string | PropertyRecord | undefined, toolbarProps: AbstractToolbarProps | undefined, location: XAndY, offset: XAndY, onItemExecuted: OnItemExecutedFunc, onCancel: OnCancelFunc, relativePosition?: RelativePosition, anchorElement?: HTMLElement): boolean;
    /** Show a Card containing React-based content, a title and a toolbar at a particular location.
     * @param content The React node of the content to display
     * @param title Title to display at the top of the card.
     * @param toolbarProps Properties of the Toolbar to display.
     * @param location Location of the Card, relative to the origin of htmlElement or the window.
     * @param offset Offset of the Card from the location.
     * @param onItemExecuted Function invoked after a Toolbar item is executed
     * @param onCancel Function invoked when the Escape key is pressed or a click occurs outside the Card
     * @param relativePosition Position relative to the given location. Defaults to TopRight.
     * @param anchorElement The HTMLElement that anchors the Card. If undefined, the location is relative to the overall window.
     * @return true if the Card was displayed, false if the Card could not be displayed.
     */
    showReactCard(content: React.ReactNode, title: string | PropertyRecord | undefined, toolbarProps: AbstractToolbarProps | undefined, location: XAndY, offset: XAndY, onItemExecuted: OnItemExecutedFunc, onCancel: OnCancelFunc, relativePosition?: RelativePosition, anchorElement?: HTMLElement): boolean;
    /** Hides the Card. */
    hideCard(): boolean;
    /** Opens a Tool Settings Ui popup at a particular location.
     * @param dataProvider The DialogLayoutDataProvider for the tool settings popup dialog.
     * @param location Location of the tool settings, relative to the origin of anchorElement or the window
     * @param offset Offset of the tool settings from the location
     * @param onCancel Function invoked when the Escape key is pressed or a click occurs outside the tool settings
     * @param relativePosition Position relative to the given location. Defaults to TopRight.
     * @param anchorElement The HTMLElement that anchors the tool settings. If undefined, the location is relative to the overall window.
     * @return true if the tool settings were displayed, false if the tool settings could not be displayed.
     */
    openToolSettingsPopup(dataProvider: DialogLayoutDataProvider, location: XAndY, offset: XAndY, onCancel: OnCancelFunc, relativePosition?: RelativePosition, anchorElement?: HTMLElement): boolean;
    /** Closes the Tool Settings Ui popup. */
    closeToolSettingsPopup(): boolean;
    /** Opens a Dialog and automatically populates it using the properties defined by the UiDataProvider.
     * @param uiDataProvider The UiDataProvider for the tool settings
     * @param title Specify title for dialog.
     * @param isModal Specify if the dialog is opened as a modal or modeless.
     * @param id Id of the dialog that is used to close it.
     * @param optionalProps Optional props for Dialog construction.
     * @return true if the tool settings were displayed, false if the tool settings could not be displayed.
     */
    openDialog(uiDataProvider: DialogLayoutDataProvider, title: string, isModal: boolean, id: string, optionalProps?: DialogProps): boolean;
    /** Closes the Tool Settings Ui popup. */
    closeDialog(dialogId: string): boolean;
}
//# sourceMappingURL=FrameworkUiAdmin.d.ts.map