import { IPageComponent, IPlatformListener, ActionType, IDataBind, EComponentType, IPlatformComponent, IPlatformDataset } from '@cloudbase/cals';
import { IAppAPI, ICompositeComponentAPI, IPageAPI } from 'src/app/global-api';
import { IQueryContext, Query } from '../query';
import { IEventFlowContext } from '../flow';
/**
 * utils start
 */
interface ISyncProp {
    changeEvent: string;
    valueFromEvent: string;
}
interface IComponentControlMeta {
    name: string;
    title: string;
    platform: string[];
    shortcut: any;
}
export interface IDataFrom {
    type: string;
    syncProp?: ISyncProp;
    /**
     * @deprecated
     */
    inputProp?: ISyncProp;
    ['x-slot-scope']?: {
        [key: string]: any;
    };
    'x-slot-directives'?: any;
}
export interface IComponentControl {
    name: string;
    /**
     * 入参表单配置
     */
    dataForm: {
        [prop: string]: IDataFrom;
    };
    /**
     * 只读属性配置
     * JSON schema
     */
    properties: {
        type: 'object';
        properties: {
            [prop: string]: {
                type: string;
                title: string;
            };
        };
    };
    /**
     * 事件配置
     */
    emitEvents: {
        /**
         * 事件标识
         */
        eventName: string;
        /**
         * 事件名
         */
        name: string;
    }[];
    events?: {
        name: string;
    }[];
    meta?: IComponentControlMeta;
    /**
     * 组件静态配置
     */
    compConfig?: any;
    inputProps: any[];
    syncProps?: any[];
    isContainer: boolean;
}
export declare function getComponentsInfo(dependencies: any): {
    [sourceKey: string]: IComponentInfo;
};
/**
 * utils end
 */
export declare function splitDynamicMap(data: any): {
    staticData: any;
    dataBinds: IDataBind[];
};
export interface IOriginKeyInfo {
    sourceKey: string;
    name: string;
    materialName: string;
    materialVersion: string;
    key: string;
    variableName: string;
    type?: ActionType;
    isComposite?: boolean;
    isPlainProps?: boolean;
    entry?: string;
}
export interface IGenerateContext {
    $app: IAppAPI;
    $page?: IPageAPI;
    $comp?: ICompositeComponentAPI;
    /**
     * @deprecated
     */
    this?: any;
    actionsMap?: Record<string, Function>;
}
export interface IGenerateOptions {
    isComposite?: boolean;
    looseError?: boolean;
    key?: string;
    /**
     * 使用 widget 数据直接计算
     */
    useScopeWidgetData?: boolean;
}
export interface IComponentInfo extends Omit<IComponentControl, 'meta' | 'type' | 'name'>, IComponentControlMeta {
    isComposite: boolean;
}
/**
 * widgets 不包括page 的 widges
 */
export declare function getComponentSchema(ctx: IGenerateContext, page: IPageComponent | {
    items: IPlatformComponent[];
    type: typeof EComponentType.COMPLEX;
    extra: any;
}, componentsInfoMap?: {
    [componentSourceKey: string]: IComponentInfo;
}, wrapperClass?: string, options?: {
    isComposite?: boolean;
    looseError?: boolean;
    processCssUnit?: 'rem' | 'px' | 'rpx';
}): {
    widgets: {};
    dataBinds: {};
    componentSchema: any;
};
export declare function generateDataBinds(ctx: IGenerateContext, dataBinds: IDataBind[], options?: IGenerateOptions): Record<string, Function>;
/**
 * dataset 特殊的绑定格式
 * 要求：入参分别为 app ， page
 * 绑定只有变量，参数，表达式的绑定
 */
export declare function generateDataBindForDataset(bind: IDataBind): Function;
export declare function generateListnerInstances(ctx: IGenerateContext, listenerInstances: (IPlatformListener & {
    jsCode?: string;
    noPropagation?: boolean;
})[], options?: IGenerateOptions): {
    key: string;
    trigger: string;
    isCapturePhase: boolean;
    noPropagation?: boolean;
    instanceFunction: Function;
    data: any;
    dataBinds: any;
    sourceKey?: string;
}[];
export declare function generateDatasetQuery(schema: IPlatformDataset['query'], context: IQueryContext, options: IGenerateOptions): Record<string, Query>;
export declare function generateEventFlows(flows: any[], context: IEventFlowContext, options: IGenerateOptions): {};
export {};
