import { DeviceLink } from '../device-link';
/**
 * 表单模板配置控制器
 * @export
 * @class FormTmplConfigController
 */
export declare class FormTmplConfigController {
    /** 存储响应式变量  */
    state: {
        tmpls: {
            id: string;
            type: DeviceLink.TmplTypeEnum;
        }[];
        runningTmpls: {
            deviceName: string;
            deviceId: string;
            fieldMaps: {
                deviceField: string;
                deviceLinkParams?: {
                    code: string;
                    name: string;
                    type: string;
                    remark: string;
                    children?: /*elided*/ any[] | undefined;
                } | undefined;
                formField?: string | undefined;
                isSubField?: boolean | undefined;
                children?: /*elided*/ any[] | undefined;
            }[];
            runtimeDeviceId?: string | undefined;
            runtimeDeviceKey?: string | undefined;
            runtimeDeviceType?: string | undefined;
            id: string;
            type: DeviceLink.TmplTypeEnum;
        }[];
    };
    /** 表单模板id */
    tmplId: string;
    /** 是否手动模式,手动模式不触发接口 */
    isManual: boolean;
    /**
     * 初始化
     *
     * @param opts
     * - tmplId 表单模板id
     */
    init(opts: {
        tmplId: string;
        isManual?: boolean;
    }): Promise<void>;
    /**
     * 设置获取到的配置数据字符串
     * @param configStr
     */
    setConfigStr(configStr?: string): void;
    getConfigStr(): string;
    /** 调用接口加载数据 */
    protected load(): Promise<void>;
    /** 调用接口保存数据 */
    save(): Promise<void>;
    /** 调用接口刷新数据 */
    refresh(): Promise<void>;
    /** 添加或更新模板，并且调用接口保存并刷新数据 */
    createOrUpdate(tmpl: DeviceLink.BasicTmpl): Promise<void>;
    /** 缓存运行中的模板 */
    cacheRunningTmpl(tmpl: DeviceLink.BasicTmpl): void;
}
