import type { F_COUNTRY } from '@feedmepos/core/entity';
import type { FmpBusiness } from 'node_modules/@feedmepos/mf-common/dist/store';
export interface IframeMessage {
    event: string;
    data?: any;
}
export declare function debugIframe(onMessage: (data: IframeMessage) => void): {
    sendMessage: (message: IframeMessage) => undefined;
};
export interface IframeMessagingClientOnMessage {
    (event: string, handler: (data: any) => void): {
        removeEventListener: () => void;
        onMessage: IframeMessagingClientOnMessage;
    };
}
export interface IframeMessagingClient {
    prepareMessage(event: string, data?: any): {
        sendAndExpectEvent<T = any>(event: string): Promise<T>;
    };
    sendMessage(event: string, data?: any): void;
    onMessage(event: string, handler: (data: any) => void): {
        removeEventListener: () => void;
        onMessage: IframeMessagingClientOnMessage;
    };
}
export declare function initIframeMode({ businesses, user, token, country }: {
    businesses: FmpBusiness[];
    user: FeedMeUser;
    token: string;
    country?: F_COUNTRY;
}): void;
export declare const iframeMode: import("vue").Ref<boolean, boolean>;
export declare function useIframeMode(): {
    readonly isIframeMode: boolean;
};
/** NOTE: Calling this function will assign iframeMode.value to true */
export declare function useIframe(onIframeReady: () => any): IframeMessagingClient;
