import { IEventEmitter } from '@breadstone/mosaik-elements';
import { ISlottable } from '../../../Behaviors/Slottable';
import type { IPortalAttachedEventDetail, IPortalDetachedEventDetail } from '../../../events';
import { CustomElement } from '../../Abstracts/CustomElement';
import type { IConnectedCallback } from '../../Abstracts/Interfaces/IConnectedCallback';
import type { IDisconnectedCallback } from '../../Abstracts/Interfaces/IDisconnectedCallback';
import type { IPortalElementProps } from './IPortalElementProps';
import { PortalProjectionElement } from './PortalProjectionElement';
/**
 * Represents the `IPortalElementEvents` interface.
 *
 * @public
 */
export interface IPortalElementEvents {
    attached: IEventEmitter<IPortalAttachedEventDetail>;
    detached: IEventEmitter<IPortalDetachedEventDetail>;
}
declare const PortalElement_base: import("../../../../Index").ControlBehaviorReturn<typeof CustomElement, import("../../../Behaviors/Slottable").ISlottableProps & ISlottable>;
/**
 * Portal - A teleportation mechanism that renders content in a different location in the DOM tree.
 *
 * @description
 * The Portal component enables rendering content outside its parent component's DOM hierarchy while maintaining
 * logical component relationships. It projects slotted content to a destination element (typically document.body
 * or a portal host), which is essential for modals, dialogs, toasts, and other overlay components that need to
 * escape z-index stacking contexts, overflow constraints, and CSS containment. The portal automatically manages
 * content lifecycle, style adoption, and cleanup when disconnected.
 *
 * @name Portal
 * @element mosaik-portal
 * @category Primitives
 *
 * @slot - The content to be portaled to the destination
 *
 * @cssprop {String} --portal-font-family - The font family CSS custom property.
 * @cssprop {String} --portal-font-letter-spacing - The font letter spacing CSS custom property.
 * @cssprop {String} --portal-font-line-height - The font line height CSS custom property.
 * @cssprop {String} --portal-font-size - The font size CSS custom property.
 * @cssprop {String} --portal-font-text-decoration - The font text decoration CSS custom property.
 * @cssprop {String} --portal-font-text-transform - The font text transform CSS custom property.
 * @cssprop {String} --portal-font-weight - The font weight CSS custom property.
 * @cssprop {String} --portal-gap - The gap CSS custom property.
 * @cssprop {String} --portal-padding-bottom - The padding bottom CSS custom property.
 * @cssprop {String} --portal-padding-left - The padding left CSS custom property.
 * @cssprop {String} --portal-padding-right - The padding right CSS custom property.
 * @cssprop {String} --portal-padding-top - The padding top CSS custom property.
 * @cssprop {String} --portal-shadow - The shadow CSS custom property.
 * @cssprop {String} --portal-shadow-blur - The shadow blur CSS custom property.
 * @cssprop {String} --portal-shadow-color - The shadow color CSS custom property.
 * @cssprop {String} --portal-shadow-offset-x - The shadow offset x CSS custom property.
 * @cssprop {String} --portal-shadow-offset-y - The shadow offset y CSS custom property.
 * @cssprop {String} --portal-shadow-spread - The shadow spread CSS custom property.
 * @cssprop {String} --portal-transition-duration - The transition duration CSS custom property.
 * @cssprop {String} --portal-transition-mode - The transition mode CSS custom property.
 * @cssprop {String} --portal-transition-property - The transition property CSS custom property.
 * @cssprop {String} --portal-translate - The translate CSS custom property.
 *
 * @fires portalAttached {PortalAttachedEvent} - Fired when the portal is attached to the DOM
 * @fires portalDetached {PortalDetachedEvent} - Fired when the portal is detached from the DOM
 *
 * @example
 * Basic portal to document body:
 * ```html
 * <div class="app-container">
 *   <mosaik-portal>
 *     <mosaik-dialog>This renders in document.body</mosaik-dialog>
 *   </mosaik-portal>
 * </div>
 * ```
 *
 * @example
 * Portal to named host:
 * ```html
 * <!-- Somewhere in layout -->
 * <mosaik-portal-host name="modals"></mosaik-portal-host>
 *
 * <!-- Portal content to host -->
 * <mosaik-portal destination="modals">
 *   <mosaik-modal>Content renders in modals host</mosaik-modal>
 * </mosaik-portal>
 * ```
 *
 * @example
 * Toast notification portal:
 * ```html
 * <mosaik-portal id="toastPortal">
 *   <div class="toast">Operation successful!</div>
 * </mosaik-portal>
 * <script>
 *   const portal = document.querySelector('#toastPortal');
 *   portal.addEventListener('portalAttached', () => {
 *     console.log('Toast is now visible');
 *   });
 * </script>
 * ```
 *
 * @public
 */
export declare class PortalElement extends PortalElement_base implements IConnectedCallback, IDisconnectedCallback, IPortalElementProps, IPortalElementEvents, ISlottable {
    private readonly _attached;
    private readonly _detached;
    private _projection;
    private _destination;
    private _adoptedStyles;
    private _isProjected;
    /**
     * @public
     */
    constructor();
    /**
     * Returns the `is` property.
     *
     * @public
     * @static
     * @readonly
    */
    static get is(): string;
    /**
     * Gets or sets the `destination` property.
     *
     * @public
     * @attr
     */
    get destination(): string | Element;
    set destination(value: string | Element);
    /**
     * Gets or sets the `adoptedStyles` property.
     *
     * @public
     */
    get adoptedStyles(): Array<CSSStyleSheet> | undefined;
    set adoptedStyles(value: Array<CSSStyleSheet> | undefined);
    /**
     * Gets or sets the `isProjected` property.
     *
     * @public
     * @attr
     * @readonly
     */
    get isProjected(): boolean;
    private set isProjected(value);
    /**
     * Gets the `projection` property.
     *
     * @public
     * @readonly
     */
    get projection(): PortalProjectionElement | null;
    /**
     * Called when a projection is attached to the DOM.
     * Provides reference to `IPortalAttachedEventDetail` as event argument.
     *
     * @public
     * @readonly
     * @eventProperty
     * @type IEventEmitter<IPortalAttachedEventDetail>
     */
    get attached(): IEventEmitter<IPortalAttachedEventDetail>;
    /**
     * Called when a projection is detached from the DOM.
     * Provides reference to `IPortalDetachedEventDetail` as event argument.
     *
     * @public
     * @readonly
     * @eventProperty
     * @type IEventEmitter<IPortalDetachedEventDetail>
     */
    get detached(): IEventEmitter<IPortalDetachedEventDetail>;
    /**
     * @public
     * @overload
     */
    onSlotChanges(slotName?: string): void;
    /**
     * @public
     * @override
     */
    connectedCallback(): void;
    /**
     * @public
     * @override
     */
    disconnectedCallback(): void;
    /**
     * @protected
     * @override
     */
    protected onApplyTemplate(): void;
    /**
     * @protected
     */
    protected attach(): void;
    /**
     * @protected
     */
    protected detach(): void;
    /**
     * @private
     */
    private getDestination;
    /**
     * Walks up from this portal through the DOM and any enclosing shadow
     * roots looking for the first ancestor that is currently in the browser
     * top layer (matches `:popover-open` or `:modal`).
     *
     * @private
     */
    private findTopLayerAncestor;
    /**
     * @private
     */
    private createProjection;
    /**
     * @private
     */
    private appendElements;
}
/**
 * @public
 */
export declare namespace PortalElement {
    type Props = IPortalElementProps;
}
/**
 * @public
 */
declare global {
    interface HTMLElementTagNameMap {
        'mosaik-portal': PortalElement;
    }
}
export {};
//# sourceMappingURL=PortalElement.d.ts.map