import { UmbModalToken } from '../token/modal-token.js';
import type { UmbModalConfig, UmbModalType } from '../types.js';
import type { UmbControllerHost } from '../../../../libs/controller-api/index.js';
import type { UUIModalElement, UUIModalSidebarSize } from '../../../../external/uui/index.js';
import { UmbControllerBase } from '../../../../libs/class-api/index.js';
import { UmbViewController } from '../../view/index.js';
import type { ElementLoaderProperty } from '../../../../libs/extension-api/index.js';
import type { IRouterSlot } from '../../router/index.js';
export interface UmbModalRejectReason {
    type: string;
}
export type UmbModalContextClassArgs<ModalAliasType extends string | UmbModalToken, ModalAliasTypeAsToken extends UmbModalToken = ModalAliasType extends UmbModalToken ? ModalAliasType : UmbModalToken<never, never>> = {
    router?: IRouterSlot | null;
    data?: ModalAliasTypeAsToken['DATA'];
    value?: ModalAliasTypeAsToken['VALUE'];
    modal?: UmbModalConfig;
};
export declare class UmbModalContext<ModalData extends {
    [key: string]: any;
} = {
    [key: string]: any;
}, ModalValue = any> extends UmbControllerBase {
    #private;
    readonly key: string;
    readonly data: ModalData;
    readonly type: UmbModalType;
    readonly element?: ElementLoaderProperty<UUIModalElement>;
    readonly backdropBackground?: string;
    readonly router: IRouterSlot | null;
    readonly alias: string | UmbModalToken<ModalData, ModalValue>;
    readonly value: import("rxjs").Observable<ModalValue>;
    readonly size: import("rxjs").Observable<string>;
    readonly view: UmbViewController;
    constructor(host: UmbControllerHost, modalAlias: string | UmbModalToken<ModalData, ModalValue>, args: UmbModalContextClassArgs<UmbModalToken>);
    _internal_setCurrentModalPath(path: string): void;
    _internal_removeCurrentModal(): Promise<void>;
    forceResolve(): void;
    isResolved(): boolean;
    /**
     * Submits this modal, returning with a value to the initiator of the modal.
     * @public
     * @memberof UmbModalContext
     */
    submit(): void;
    /**
     * Closes this modal
     * @param reason
     * @public
     * @memberof UmbModalContext
     */
    reject(reason?: UmbModalRejectReason): void;
    /**
     * Gives a Promise which will be resolved when this modal is submitted.
     * @returns {Promise<ModalValue>}
     * @public
     * @memberof UmbModalContext
     */
    onSubmit(): Promise<ModalValue>;
    /**
     * Gives the current value of this modal.
     * @returns {ModalValue}
     * @public
     * @memberof UmbModalContext
     */
    getValue(): ModalValue;
    /**
     * Sets the current value of this modal.
     * @param value
     * @public
     * @memberof UmbModalContext
     */
    setValue(value: ModalValue): void;
    /**
     * Updates the current value of this modal.
     * @param partialValue
     * @public
     * @memberof UmbModalContext
     */
    updateValue(partialValue: Partial<ModalValue>): void;
    /**
     * Updates the size this modal.
     * @param size
     * @public
     * @memberof UmbModalContext
     */
    setModalSize(size: UUIModalSidebarSize): void;
    destroy(): void;
}
