/** @packageDocumentation
 * @module Frontstage
 */
import * as React from "react";
import { PointProps, StagePanelLocation } from "@itwin/appui-abstract";
import { CommonProps, RectangleProps } from "@itwin/core-react";
import { NineZoneManagerProps, ResizeHandle, WidgetZoneId, ZoneTargetType } from "@itwin/appui-layout-react";
import { StagePanelState } from "../stagepanels/StagePanelDef";
import { WidgetTabs } from "../widgets/WidgetStack";
import { ZoneDef } from "../zones/ZoneDef";
import { FrontstageDef } from "./FrontstageDef";
/** Interface defining callbacks for widget changes
 * @public
 * @deprecated in 3.0. UI 1.0 will be removed in AppUi 4.0.
 */
export interface WidgetChangeHandler {
    handleResize(zoneId: WidgetZoneId, resizeBy: number, handle: ResizeHandle, filledHeightDiff: number): void;
    handleTabClick(widgetId: WidgetZoneId, tabIndex: number): void;
    handleTabDragStart(widgetId: WidgetZoneId, tabIndex: number, initialPosition: PointProps, widgetBounds: RectangleProps): void;
    handleTabDragEnd(): void;
    handleTabDrag(dragged: PointProps): void;
    handleWidgetStateChange(widgetId: WidgetZoneId, tabIndex: number, isOpening: boolean): void;
}
/** Interface defining callbacks for stage panel changes
 * @deprecated in 3.5. Used in UI1.0 only.
 * @public
 */
export interface StagePanelChangeHandler {
    /** @alpha */
    handlePanelInitialize(panelLocation: StagePanelLocation, size: number): void;
    /** @alpha */
    handlePanelResize(panelLocation: StagePanelLocation, resizeBy: number): void;
    /** @alpha */
    handlePanelPaneTargetChange(panelLocation: StagePanelLocation, paneIndex: number | undefined): void;
    /** @alpha */
    handlePanelTargetChange(panelLocation: StagePanelLocation | undefined): void;
    /** @alpha */
    handleTogglePanelCollapse(panelLocation: StagePanelLocation): void;
}
/** Interface defining callbacks for ZoneDropTarget changes
 * @deprecated in 3.0. UI 1.0 will be removed in AppUi 4.0.
 * @public
 */
export interface TargetChangeHandler {
    handleTargetChanged(zoneId: WidgetZoneId, type: ZoneTargetType, isTargeted: boolean): void;
}
/** Interface defining callbacks for nine zone changes
 * @deprecated in 3.5. Used in UI1.0 only.
 * @public
 */
export interface NineZoneChangeHandler {
    handleFloatingZonesBoundsChange(bounds: RectangleProps): void;
    handleZonesBoundsChange(bounds: RectangleProps): void;
}
/** Interface defining a provider for Zone definitions
 * @deprecated in 3.5. Used in UI1.0 only.
 * @public
 */
export interface ZoneDefProvider {
    getZoneDef(zoneId: number): ZoneDef | undefined;
}
/** Runtime Props for the Frontstage
 * @internal
 */
export interface FrontstageRuntimeProps {
    frontstageDef: FrontstageDef;
    nineZone: NineZoneManagerProps;
    nineZoneChangeHandler: NineZoneChangeHandler;
    stagePanelChangeHandler: StagePanelChangeHandler;
    targetChangeHandler: TargetChangeHandler;
    widgetChangeHandler: WidgetChangeHandler;
    widgetTabs: WidgetTabs;
    zoneDefProvider: ZoneDefProvider;
}
/** State for the FrontstageComposer component.
 * @internal
 */
interface FrontstageComposerState {
    allowPointerUpSelection: boolean;
    modalFrontstageCount: number;
    nineZone: NineZoneManagerProps;
    widgetTabs: WidgetTabs;
}
/** FrontstageComposer React component.
 * @deprecated in 3.0. Use [StandardFrontstageProvider]($appui-react) instead
 * @public
 */
export declare class FrontstageComposer extends React.Component<CommonProps, FrontstageComposerState> implements WidgetChangeHandler, TargetChangeHandler, ZoneDefProvider, StagePanelChangeHandler, NineZoneChangeHandler {
    private _frontstageDef;
    private _isMounted;
    /** @internal */
    readonly state: Readonly<FrontstageComposerState>;
    constructor(props: CommonProps);
    private determineNineZoneProps;
    private initializeZoneBounds;
    private determineWidgetTabs;
    private _handleFrontstageActivatedEvent;
    private initializeFrontstageLayout;
    private _handleModalFrontstageChangedEvent;
    private _closeModalStage;
    private renderModalFrontstage;
    render(): React.ReactNode;
    componentDidMount(): void;
    componentWillUnmount(): void;
    private _handleWindowResize;
    handleResize: (zoneId: WidgetZoneId, resizeBy: number, handle: ResizeHandle, filledHeightDiff: number) => void;
    handleTabClick: (widgetId: WidgetZoneId, tabIndex: number) => void;
    handleTabDragStart: (widgetId: WidgetZoneId, tabIndex: number, initialPosition: PointProps, widgetBounds: RectangleProps) => void;
    handleTabDragEnd: () => void;
    handleTabDrag: (dragged: PointProps) => void;
    handleTargetChanged(zoneId: WidgetZoneId, type: ZoneTargetType, isTargeted: boolean): void;
    /** @alpha */
    handlePanelInitialize(panelLocation: StagePanelLocation, size: number): void;
    /** @alpha */
    handlePanelResize(panelLocation: StagePanelLocation, resizeBy: number): void;
    /** @alpha */
    handlePanelPaneTargetChange(panelLocation: StagePanelLocation, paneIndex: number | undefined): void;
    /** @alpha */
    handlePanelTargetChange(panelLocation: StagePanelLocation | undefined): void;
    /** @alpha */
    handleTogglePanelCollapse(panelLocation: StagePanelLocation): void;
    handleFloatingZonesBoundsChange(bounds: RectangleProps): void;
    handleZonesBoundsChange(bounds: RectangleProps): void;
    handleWidgetStateChange(widgetId: WidgetZoneId, tabIndex: number, isOpening: boolean): void;
    getZoneDef(zoneId: number): ZoneDef | undefined;
    getGhostOutlineBounds(zoneId: WidgetZoneId): RectangleProps | undefined;
    setZoneAllowsMerging(zoneId: WidgetZoneId, allowsMerging: boolean): void;
    mergeZones(toMergeId: WidgetZoneId, targetId: WidgetZoneId): void;
    private layout;
    private _handleWidgetStateChangedEvent;
    private _handlePanelStateChangedEvent;
    private _handlePanelSizeChangedEvent;
    private _handleToolActivatedEvent;
    private _handleToolPanelOpenedEvent;
    private _handlePointerDown;
    private _handlePointerUp;
    private setAllowPointerUpSelection;
    private setPanelState;
}
/** @internal */
export declare const panelStateToIsCollapsed: (panelState: StagePanelState) => boolean;
/** @internal */
export declare const isCollapsedToPanelState: (isCollapsed: boolean) => StagePanelState.Minimized | StagePanelState.Open;
/** @internal */
export declare const ToolGroupPanelContext: React.Context<boolean>;
export {};
//# sourceMappingURL=FrontstageComposer.d.ts.map