import { GenesisElement } from '@genesislcap/web-core';
/**
 * Contract for pages that support docking the AI assistant.
 * Register an implementation with {@link getAiPopoutManager} on mount and deregister on unmount.
 *
 * @beta
 */
export interface AiDockProvider {
    /**
     * Called when the user expands the bubble. The provider **moves the given
     * element** into its layout — e.g. via a layout factory that re-parents it into
     * a pane. It is the ONE live assistant element, so it must be moved by reference,
     * **not cloned** (a clone would be a second, dead instance). Session state
     * survives the move because it lives in module-level registries, not the element.
     */
    onDock(element: HTMLElement): Promise<void>;
    /**
     * Called when the user collapses the panel or before navigation. By the time
     * this runs the manager has already moved the assistant element back into the
     * bubble, so the provider only needs to tear down its now-empty layout slot.
     */
    onUndock(): Promise<void>;
    /**
     * Called by `collapseIfDocked` before navigation. The provider is responsible for
     * finding the docked assistant element and calling `handlePopout()` on it, which
     * publishes `chat-popin` and returns the assistant to the bubble.
     */
    initiateCollapse(): void;
}
/**
 * App-shell component that owns the pop-out/pop-in lifecycle for the AI assistant bubble.
 *
 * @remarks
 * Place this in the persistent app shell, wrapping a `foundation-ai-chat-bubble` that
 * contains an AI assistant element in the `dialog-content` slot.
 *
 * GENC-1351 (Option A — single element): rather than cloning a second assistant to
 * dock, this manager **moves the one real element** between the bubble and the page
 * layout. One connected instance means no dual-view coordination (no shared-driver
 * unwire/rewire, host election, or duplicated side-effects); the session survives the
 * move because the driver/store/persister live in module-level registries keyed by the
 * element's identity.
 *
 * Pages that support docking call `aiPopoutManager.registerDockProvider()` on mount
 * and `aiPopoutManager.deregisterDockProvider()` on unmount.
 *
 * @example
 * ```html
 * <foundation-ai-popout-manager>
 *   <foundation-ai-chat-bubble title="My Assistant">
 *     <my-assistant slot="dialog-content"></my-assistant>
 *   </foundation-ai-chat-bubble>
 * </foundation-ai-popout-manager>
 * ```
 *
 * @beta
 */
export declare class FoundationAiPopoutManager extends GenesisElement {
    /** True when a dock provider is registered — controls expand button visibility. */
    canDock: boolean;
    /**
     * The single assistant element. Captured while it's in the bubble slot and held
     * across the move (it's the same instance whether docked or in the bubble), so
     * pop-in can re-home it even though it's no longer a child of this manager.
     */
    private assistantEl;
    private dockProvider;
    private isDocked;
    private unsubBus?;
    connectedCallback(): void;
    disconnectedCallback(): void;
    /** Locate the assistant element currently slotted into the bubble. */
    private findAssistant;
    /**
     * Register an externally-created assistant element and its docked state. For
     * single-element hosts that create the assistant directly in a layout pane (rather
     * than statically in the bubble), so the manager tracks the one element, whether it's
     * currently docked (for pop-in re-homing), reflects the right `popout-mode` on it
     * (drives the header button), and hides the empty bubble.
     */
    adoptAssistant(el: HTMLElement, docked: boolean): void;
    /** Hide the floating bubble unless it currently contains the assistant. */
    private syncBubbleVisibility;
    canDockChanged(): void;
    registerDockProvider(provider: AiDockProvider): void;
    deregisterDockProvider(): void;
    /**
     * If the assistant is currently docked, collapses it back into the bubble.
     * Await this in `onBeforeNavButtonClick` to ensure cleanup before navigation.
     */
    collapseIfDocked(): Promise<void>;
}
/** True when the assistant is active in the layout panel (docked) rather than the bubble. */
export declare function isAiAssistantDocked(): boolean;
/**
 * Returns the active `FoundationAiPopoutManager` instance, or `undefined` if none is mounted.
 * Import this in pages to call `registerDockProvider` / `deregisterDockProvider`.
 *
 * @beta
 */
export declare function getAiPopoutManager(): FoundationAiPopoutManager | undefined;
//# sourceMappingURL=popout-manager.d.ts.map