import { ActiveRecord, ActiveRecords, QueryContext, QueryVariables, SubmitValue } from '@oinone/kunlun-engine';
import { FieldEventName } from '@oinone/kunlun-event';
import { Condition } from '@oinone/kunlun-request';
import { CallChaining } from '@oinone/kunlun-shared';
import { BaseFieldWidget } from '../token';
import { HandlerEvent as FieldHandlerEvent } from '../token/BaseFieldWidget';
import { RefreshProcessFunction } from '../types';
import { BaseElementViewWidget, BaseElementViewWidgetProps } from './BaseElementViewWidget';
export interface BaseElementObjectViewWidgetProps extends BaseElementViewWidgetProps {
    submitCallChaining?: CallChaining<SubmitValue>;
    validatorCallChaining?: CallChaining<boolean>;
}
interface FieldWidgetEntity {
    widget: BaseFieldWidget;
    index: number;
}
export declare class BaseElementObjectViewWidget<Props extends BaseElementObjectViewWidgetProps = BaseElementObjectViewWidgetProps> extends BaseElementViewWidget<Props> {
    protected currentSubmitCallChaining: CallChaining<SubmitValue> | undefined;
    /**
     * 数据提交
     * @protected
     */
    protected get submitCallChaining(): CallChaining<SubmitValue> | undefined;
    protected currentValidatorCallChaining: CallChaining<boolean> | undefined;
    /**
     * 数据校验
     * @protected
     */
    protected get validatorCallChaining(): CallChaining<boolean> | undefined;
    private parentCols;
    get cols(): number;
    protected get formData(): ActiveRecord;
    protected enableScrollToErrorField: boolean;
    getData(): ActiveRecord;
    setData(data: ActiveRecords | undefined): void;
    /**
     * 加载函数命名空间
     * @protected
     * @deprecated 不允许手动设置函数命名空间
     */
    get loadFunctionNamespace(): string;
    get loadFunctionFun(): string | undefined;
    initialize(props: Props): this;
    fetchData(condition?: Condition): Promise<ActiveRecord>;
    generatorCondition(condition?: Condition): Condition | undefined;
    generatorQueryVariables(variables?: QueryVariables): QueryVariables;
    generatorQueryContext(context?: QueryContext): QueryContext;
    get useConstruct(): boolean;
    queryData(variables: QueryVariables, context: QueryContext): Promise<ActiveRecord>;
    /**
     * 页面构造函数
     * @param queryData 查询数据
     * @param variables
     * @param context
     */
    queryConstruct(queryData: ActiveRecords | undefined, variables: QueryVariables, context: QueryContext): Promise<ActiveRecord>;
    protected testInitialContext(): void;
    /**
     * 页面查询函数
     * @param queryData
     * @param variables
     * @param context
     */
    queryOne(queryData: ActiveRecord, variables: QueryVariables, context: QueryContext): Promise<ActiveRecord>;
    /**
     * 页面条件查询函数
     * @param condition
     * @param variables
     * @param context
     */
    queryOneByWrapper(condition: Condition, variables: QueryVariables, context: QueryContext): Promise<ActiveRecord>;
    submit(): Promise<SubmitValue | undefined>;
    validator(): Promise<boolean>;
    protected mountedProcess(): Promise<void>;
    protected repairViewMode(): void;
    protected parentRefreshProcess: RefreshProcessFunction | undefined;
    protected refreshProcess(condition?: Condition): Promise<void>;
    protected $$beforeMount(): void;
    protected $$mounted(): void;
    protected $$executeRefreshCallChaining(args: unknown[] | undefined): Promise<void>;
    protected fieldWidgetMap: Map<string, FieldWidgetEntity>;
    protected tryScrollToFieldWidget(fieldWidget: BaseFieldWidget): void;
    protected fieldWidgetMounted(widget: BaseFieldWidget): void;
    protected fieldWidgetUnmounted(widget: BaseFieldWidget): void;
    getFieldWidgets(sort?: boolean): BaseFieldWidget[];
    /**
     * 监听form内部字段的事件, 依次传参
     *
     * @param {string | string[] | '*'} field 字段的field ，如果是 "*" 那么就会监听所有的字段
     * @param {FieldEventName} eventName 事件名
     * @param {Function} callback 事件触发的回调函数
     *
     * @example
     * formWidget.onFieldEvent('field', 'change', (fieldInstance) => {})
     */
    onFieldEvent(field: string | string[] | '*', eventName: FieldEventName, callback: FieldHandlerEvent): any;
    /**
     * 监听form内部字段的事件, 事件对象参数
     *
     * @param {string | string[] | '*'} field 字段的field ，如果是 "*" 那么就会监听所有的字段
     * @param {Object} eventName 事件对象
     *
     * @example
     * formWidget.onFieldEvent('field', { change(fieldInstance) { }})
     */
    onFieldEvent(field: string | string[] | '*', eventName: {
        [key in FieldEventName]?: FieldHandlerEvent;
    }): any;
}
export {};
