import { ActiveRecord, ActiveRecords, GetRequestModelFieldsOptions, RequestModelField, RuntimeAction, RuntimeContext, RuntimeFunctionDefinition, RuntimeServerAction, SubmitValue } from '@oinone/kunlun-engine';
import { EventConsumer, KeyboardEventMessage } from '@oinone/kunlun-event';
import { ExpressionRunParam } from '@oinone/kunlun-expression';
import { ActionElement } from '@oinone/kunlun-meta';
import { Condition } from '@oinone/kunlun-request';
import { ReturnPromise } from '@oinone/kunlun-shared';
import { ButtonType, ConfirmType, PopconfirmPlacement } from '@oinone/kunlun-vue-ui-common';
import { Component } from 'vue';
import { BaseActionWidget, BaseActionWidgetProps, BaseView, QueryExpression } from '../../../basic';
import { ActionKeyboardConfig, ClickResult } from '../../../typing';
export interface ActionWidgetProps<Action extends RuntimeAction = RuntimeAction> extends BaseActionWidgetProps<Action> {
    inline?: boolean;
}
export declare class ActionWidget<Action extends RuntimeAction = RuntimeAction, Props extends ActionWidgetProps<Action> = ActionWidgetProps<Action>> extends BaseActionWidget<Action, Props> {
    /**
     * 搜索数据
     * @protected
     */
    protected searchBody: ActiveRecord | undefined;
    /**
     * 搜索表达式
     * @protected
     */
    protected searchConditions: QueryExpression[] | undefined;
    protected viewFilter: string | undefined;
    protected nextActionComponent: Component | undefined;
    protected actionComponent: Component | undefined;
    protected keyboardConfig: ActionKeyboardConfig | undefined;
    protected keyboardEventConsumer?: EventConsumer;
    get allInvisible(): boolean | undefined;
    initialize(props: Props): this;
    get disabled(): any;
    get disabledTitle(): string;
    get help(): any;
    protected get validateForm(): boolean;
    protected get goBack(): boolean;
    protected get closeDialog(): boolean;
    protected get closeAllDialog(): boolean;
    protected get closeDrawer(): boolean;
    protected get closeAllDrawer(): boolean;
    /**
     * 刷新主视图，o2m字段打开的弹窗，里面的提交动作刷新的就是主模型视图的数据
     * @protected
     */
    protected get refreshRoot(): boolean;
    /**
     * 刷新当前视图，刷新当前视图的数据，如弹窗内的动作只会刷新弹窗的数据，不会刷新主模型视图的数据
     * @protected
     */
    protected get refreshData(): boolean;
    protected get label(): string;
    protected nextButtonType: string | undefined;
    protected buttonType: string | undefined;
    protected nextOperatorColumnButtonType: string | undefined;
    protected operatorColumnButtonType: string | undefined;
    protected defaultType: ButtonType;
    protected get type(): string;
    protected get bizStyle(): string;
    protected get icon(): string | undefined;
    protected seekSearchRuntimeContext(): RuntimeContext | undefined;
    protected seekParentMetadataRuntimeContext(): RuntimeContext<unknown> | undefined;
    /**
     * 获取按钮上方的搜索内容
     *
     * @param {record: object} 自定义扩展数据
     * @param {concatParentFilter: boolean} 当父视图存在过滤条件的时候，是否拼接到当前的条件中  默认拼接
     *
     * @returns {{rsql: string, queryData: object, condition: Condition | string, queryDataToString: () => string}}
     */
    protected getSearchRsqlAndQueryParams(record?: ActiveRecord, concatParentFilter?: boolean): {
        rsql: string | Condition;
        queryData: {};
        condition: string | Condition;
        queryDataToString: () => string;
    };
    protected buildSearchConditions(record?: ActiveRecord, concatParentFilter?: boolean): {
        runtimeContext: RuntimeContext;
        condition: Condition | undefined;
    } | undefined;
    protected executeSearchExpression(searchWidget: BaseView, expression: string): string | undefined;
    /**
     * 动作上下文
     * @protected
     */
    protected isExistContext(): number | undefined;
    protected mergeContext(activeRecords: ActiveRecords | undefined): ActiveRecords | undefined;
    /**
     * 构建上下文
     * @param activeRecord 指定上下文
     * @protected
     */
    protected buildContext(activeRecord?: ActiveRecord): Record<string, unknown> | undefined;
    private testExpressionNotIn;
    /**
     * 是否开启二次确认框
     */
    protected get enableConfirm(): boolean;
    /**
     * 开启二次确认框的时候。是否显示二次确认框
     * false -> 需要手动点击
     * true -> 自动显示二次确认框
     */
    protected visibleConfirm: boolean;
    protected changeVisibleConfirm(visible: boolean): void;
    protected get confirmType(): ConfirmType | undefined;
    protected get confirm(): string | undefined;
    protected get confirmText(): string | undefined;
    protected get confirmHtml(): boolean | undefined;
    protected get confirmFun(): string | undefined;
    protected get confirmPosition(): PopconfirmPlacement;
    protected get confirmTitle(): string | undefined;
    protected get confirmWidth(): string | undefined;
    protected get enterText(): string | undefined;
    protected get cancelText(): string | undefined;
    protected get actionElement(): ActionElement;
    private filterByContextType;
    executeExpressionByParameters<T>(parameters: Partial<ExpressionRunParam>, expression: string, errorValue?: T): T | string | undefined;
    executeExpression<T>(expression: string, errorValue?: T): T | string | undefined;
    protected invisibleProcess(invisible: boolean | string): boolean | undefined;
    protected get variables(): {};
    protected resolveVariables(vari: Record<string, unknown>): Record<string, unknown>;
    /**
     * 手动触发按钮点击方法
     * @param args 参数
     */
    click(...args: unknown[]): Promise<ClickResult>;
    /**
     * 动作点击
     * @param args 参数
     * @protected
     */
    protected validateAndClick(...args: unknown[]): Promise<ClickResult>;
    /**
     * 原始动作点击方法
     * @param args 参数
     */
    protected clickAction(...args: unknown[]): ReturnPromise<ClickResult>;
    /**
     * 二次弹窗校验
     */
    validateConfirm(): Promise<boolean>;
    protected validateConfirmByText(): Promise<boolean>;
    protected validateConfirmByFun(): Promise<boolean>;
    protected validatorForm(): Promise<boolean>;
    /**
     * 执行验证
     * <p>
     * 生命周期通知类型:
     * {@link LifeCycleTypes#ON_VIEW_VALIDATE_START} 验证开始
     * {@link LifeCycleTypes#ON_VIEW_VALIDATE_END} 验证结束
     * {@link LifeCycleTypes#ON_VIEW_VALIDATE_SUCCESS} 验证成功
     * {@link LifeCycleTypes#ON_VIEW_VALIDATE_FAILED} 验证失败
     * </p>
     * @protected
     */
    protected validator(sendErrorMessage?: boolean): Promise<boolean>;
    protected clickActionAfter(result: ClickResult): ReturnPromise<ClickResult>;
    /**
     * @description 根据xml中api的配置，校验提交数据
     *
     * @returns {Promise | null} 如果配置了submitApi，则返回校验后的结果，否则返回null
     *
     * @example
     * <view widget="form">
     *  <api name="apiName">
     *    <validation scope="作用域" fun="校验函数" expression="表达式校验" tips="错误的提示"/>
     *    <action refs='xxxxx' submit-api="apiName"  displayName='确定' />
     *  </api>
     * </view>
     */
    protected validatorByApi(): Promise<{
        status: boolean;
        message: string;
    } | null>;
    /**
     * @description 客户端校验「表达式、全局函数校验」
     *
     * @param {string | boolean} expression 表达式
     * @param {string} fun 全局的函数名，`挂在window中的函数`
     *
     * @returns {boolean}
     */
    private executeClientValidator;
    /**
     * @description 服务端函数校验「表达式、服务端函数校验」
     */
    private executeServerValidator;
    protected getRequestModelFields(options?: GetRequestModelFieldsOptions): Promise<RequestModelField[]>;
    protected seekPopupMainRuntimeContext(): RuntimeContext;
    protected submit(action: RuntimeServerAction): Promise<SubmitValue>;
    protected executeFunction<T>(functionDefinition: RuntimeFunctionDefinition, requestFields: RequestModelField[], activeRecords: ActiveRecords | undefined): Promise<T>;
    private validatorByExpression;
    /**
     * 获取当前domain
     *
     */
    get actionDomain(): string | undefined;
    resolveDynamicDomain(domain?: string): string;
    protected onKeypress(self: EventConsumer, message: KeyboardEventMessage): void;
    protected subscribeKeyboardEvent(): void;
    protected unsubscribeKeyboardEvent(): void;
    protected startKeyboardEvent(): void;
    protected stopKeyboardEvent(): void;
    protected $$mounted(): void;
    protected $$unmounted(): void;
    protected $$activated(): void;
    protected $$deactivated(): void;
}
