import { IWebAppAPI } from '@cloudbase/weda-client';
import { UserWidget } from '../utils';
interface IBaseState {
    state: {
        [key: string]: any;
    };
    computed: {
        [key: string]: any;
    };
    dataset?: {
        state?: {};
        params?: {};
        query?: {};
    };
}
export declare const subPackageName = "";
export declare let app: IAppAPI;
export declare const $w: any;
export declare function registerApp(_app?: IAppAPI): void;
export interface IAppAPI extends IWebAppAPI, IBaseState {
    domain: string;
    app?: IAppAPI;
    $app?: IAppAPI;
    mainApp?: IAppAPI;
    common: {};
    enumOptions?: {};
    /**
     * 内置方法
     */
    setState: (state: any) => void;
    invoke: (params: any) => void;
    utils: IWebAppAPI['utils'] & {
        formatEnum: (path: any, optionname: any, app: any) => string;
    };
}
export declare function removeGlboalApi(): void;
export interface IPageAPI extends IBaseState {
    __internal__?: {
        $w?: any;
        active: boolean;
    };
    $page?: IPageAPI;
    id?: string;
    handler: {
        [key: string]: any;
    };
    widgets: {
        [key: string]: any;
    };
    setState: (state: any) => void;
    setParams: (params: any) => void;
    /**
     * @deprecated
     */
    invokeComponentMethod: (props: {
        component: string | UserWidget;
        method: string;
        params: any;
    }) => any;
    _dataBinds: {
        [key: string]: any;
    };
}
export declare function createPageApi(): IPageAPI;
export interface ICompositeComponentAPI extends IBaseState {
    __internal__?: {
        $w?: any;
    };
    id: string;
    handler?: {
        [key: string]: any;
    };
    props: {
        [key: string]: any;
    };
    widgets?: {
        [key: string]: any;
    };
    _dataBinds?: {
        [key: string]: any;
    };
    _instanceRef: {
        current: any;
    };
    compConfig?: Function;
}
export declare function createCompApi({ id, ref, state, computed, _dataBinds, compConfig, widgets, node, events, props, handler, propsData, }: {
    id: any;
    ref: any;
    state?: import("mobx").IObservableObject;
    computed?: {};
    _dataBinds?: {};
    compConfig?: {};
    widgets?: {};
    node: any;
    events: any;
    props: any;
    handler?: {};
    propsData: any;
}): ICompositeComponentAPI;
export {};
