import type { PropType, ExtractPropTypes, InjectionKey, Ref, ShallowRef } from 'vue';
import qqtApi from '@qqt-product/api';
import type { VxeTableDataRow, VxeGridPropTypes,  VxeTableDefines,  VxeTableInstance } from 'vxe-table';
export declare const buttonConfigProps: {
    attrs: {
        type: PropType<ObjectMap>;
        default: () => {};
    };
    extend: {
        type: PropType<ObjectMap>;
        default: () => {};
    };
    buttons: {
        type: PropType<ButtonItem[]>;
        default: () => never[];
    };
};
export type ButtonConfigProps = ExtractPropTypes<typeof buttonConfigProps>;
export type ObjectMap = Record<string | number, any>;
export interface OptColumnListItem {
    type?: string;
    title: string;
    authorityCode?: string;
    attrs?: ObjectMap;
    args?: {
        url?: string;
        method?: string;
        params?: ObjectMap | (({ currentOpt, row }: {
            currentOpt: OptColumnListItem;
            row: ObjectMap;
        }) => object | void);
        [key: string]: unknown;
    };
    click?: (args: ListOptionsEventParams) => void;
    disabled?: (({ currentOpt, row }: {
        currentOpt: OptColumnListItem;
        row: ObjectMap;
    }) => boolean | void) | boolean;
}
export interface ButtonItem {
    label?: string;
    icon?: string | ObjectMap;
    type?: string;
    attrs?: ObjectMap;
    args?: {
        url?: string;
        [key: string]: unknown;
    };
    authorityCode?: string;
    disabled?: (<T>(args: T) => boolean | void) | boolean;
    click?: (args: ButtonItem) => void;
    handleBefore?: <T>(args: T) => Promise<T> | void;
    handleAfter?: <T>(args: T) => Promise<T> | void;
}
export interface ToolsButtonItem extends ButtonItem {
    toggleIcon?: ObjectMap;
}
export interface QueryFormItem {
    type: string;
    label: string;
    fieldName: string;
    placeholder?: string;
    options?: ObjectMap[];
    attrs?: ObjectMap;
    dictCode?: string;
    change?: (args: QueryFormItem) => void;
}
export interface ISelectArgs {
    value: string;
    label: string;
}
export interface QueryFormItemSelect extends QueryFormItem {
    filterOption?: (input: string, option: any) => any;
}
export interface PageData {
    onlyShowNav?: boolean;
    isAggregate?: '1' | '0';
    isUseLocalColumns?: boolean;
    localColumns?: GridColumn[];
    optionConfig?: {
        attrs?: ObjectMap;
        extend?: ObjectMap;
        options: OptColumnListItem[];
    };
    buttonConfig?: {
        attrs?: ObjectMap;
        extend?: ObjectMap;
        buttons: ButtonItem[];
    };
    toolsConfig?: {
        attrs?: ObjectMap;
        extend?: ObjectMap;
        buttons: ToolsButtonItem[];
    };
    queryConfig?: {
        attrs?: ObjectMap;
        extend?: ObjectMap;
        customSearch?: (args: ObjectMap) => void;
        customReset?: (args: ObjectMap) => void;
        form: QueryFormItem[];
        needAdvancedQuery?: boolean;
        formState?: ObjectMap;
    };
    statusConfig?: {
        show?: (() => boolean | void) | boolean;
        filter?: ObjectMap;
        currentValue?: TabListItem;
        activeKey?: number | string | unknown;
    };
    filterConfig?: {
        show?: (() => boolean | void) | boolean;
        filter?: ObjectMap;
    };
    navConfig?: {
        show?: (() => boolean | void) | boolean;
    };
    listMergeConfig?: {
        show?: (() => boolean | void) | boolean;
        options: ListMergeDataItem[];
        currentValue: string | number;
        change: (event: Event, value?: string | number, options?: ListMergeDataItem[]) => void;
    };
    pagerConfig?: VxeGridPropTypes.PagerConfig;
    isOrder?: ObjectMap;
    superQueryConfig?: {
        queryModel: QueryParamsItem[];
        superQuery: ObjectMap;
    };
    chatBiBusinessType?: string;
    [key: string]: unknown | any;
}
export interface ListMergeDataItem {
    title: string;
    key: number | string;
}
export interface TabsData {
    label?: string;
    tabList?: TabListItem[];
}
export interface TabListItem {
    proName: string;
    rejectReason: string;
    title: string;
    total: string | number;
    flag?: string;
    [key: string]: any;
}
export declare const INJECT_KEY_PAGE_DATA: InjectionKey<PageData>;
export type ListPageLayoutProps = ExtractPropTypes<typeof listPageLayout>;
export declare const LIST_LAYOUT_PROPS_TOKEN: InjectionKey<ListPageLayoutProps>;
export declare const LIST_LAYOUT_GRID_DATA_TOKEN: unique symbol;
export declare const listPageLayout: {
    loading: {
        type: BooleanConstructor;
        default: boolean;
    };
    extraListConfig: {
        type: PropType<ObjectMap>;
        default: () => {};
    };
    pageData: {
        type: PropType<PageData>;
        default: () => {
            optionConfig: {
                options: never[];
            };
            buttonConfig: {
                buttons: never[];
            };
            queryConfig: {
                form: never[];
                formState: {};
            };
            statusConfig: {};
            superQueryConfig: {
                queryModel: never[];
                superQuery: {};
            };
        };
    };
    apiUrls: {
        type: PropType<ApiUrls>;
        default: () => {};
    };
    beforeHandleData: {
        type: PropType<(column: GridColumn[]) => void>;
    };
    afterHandleData: {
        type: PropType<(tableData: ObjectMap[]) => void>;
    };
    handleAfterDataResponse: {
        type: PropType<(dataSource: any) => any>;
    };
    localColumnGroup: {
        type: PropType<(column: GridColumn[]) => GridColumn[]>;
    };
};
export type ListContent = ExtractPropTypes<typeof listContent>;
export declare const LIST_CONTENT_TOKEN: InjectionKey<ListContent>;
export declare const listContent: {
    loading: {
        type: BooleanConstructor;
        default: boolean;
    };
    extraListConfig: {
        type: PropType<ObjectMap>;
        default: () => {};
    };
    tableColumns: {
        type: PropType<VxeGridPropTypes.Columns<VxeTableDataRow>>;
        default: () => never[];
    };
    pageData: {
        type: PropType<PageData>;
        default: () => {};
    };
    tabsData: {
        type: PropType<TabsData>;
        default: () => {};
    };
    apiUrls: {
        type: PropType<ApiUrls>;
        default: () => {};
    };
    afterHandleData: {
        type: PropType<(column: GridColumn[]) => void>;
    };
    handleAfterDataResponse: {
        type: PropType<(dataSource: any) => any>;
    };
    filterList: never[];
};
export interface ButtonConfig {
    attrs?: ObjectMap;
    extend?: ObjectMap;
    buttons: ButtonItem[];
}
export interface ToolsConfig {
    attrs?: ObjectMap;
    extend?: ObjectMap;
    buttons: ToolsButtonItem[];
}
export type EventHandler = <T>(args: T) => void;
export interface ApiUrls {
    columnsCode: string;
    list: string;
    countTabsUrl: string;
    quickNav?: string;
    [key: string]: unknown;
}
export type PagerAlign = 'right' | 'center' | 'left';
export type PageLayouts = 'PrevJump' | 'PrevPage' | 'JumpNumber' | 'NextPage' | 'NextJump' | 'Sizes' | 'FullJump' | 'PageCount' | 'Total';
export declare const pagerConfigProps: {
    total: NumberConstructor;
    pages: NumberConstructor;
    currentPage: NumberConstructor;
    pageSize: NumberConstructor;
    pageSizes: {
        (arrayLength: number): number[];
        (...items: number[]): number[];
        new (arrayLength: number): number[];
        new (...items: number[]): number[];
        isArray(arg: any): arg is any[];
        readonly prototype: any[];
        from<T>(arrayLike: ArrayLike<T>): T[];
        from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
        from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
        from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
        of<T_4>(...items: T_4[]): T_4[];
        readonly [Symbol.species]: ArrayConstructor;
    };
    align: PropType<PagerAlign>;
    layouts: PropType<PageLayouts[]>;
    perfect: BooleanConstructor;
};
export type PagerConfigProps = ExtractPropTypes<typeof pagerConfigProps>;
export interface IsOrder {
    column: string;
    order: string;
}
export interface QueryCustomData {
    isOrder?: IsOrder;
    filter?: ObjectMap;
    queryForm?: ObjectMap;
}
export declare const otherDataProps: {
    isOrder: {
        type: PropType<IsOrder>;
        default: () => {
            column: string;
            order: string;
        };
    };
    filter: {
        type: PropType<ObjectMap>;
        default: () => {};
    };
};
export interface FetchDataReturn {
    tableData: Ref<ObjectMap[]>;
    otherDatas?: QueryCustomData;
    pagerConfig: Ref<VxeGridPropTypes.PagerConfig>;
    loading: ShallowRef<boolean>;
}
export interface GridDataTypes extends FetchDataReturn {
    updateListData: (params?: FetchDataOptions, customRequest?: qqtApi.Request) => void;
    tableColumns: Ref<VxeGridPropTypes.Columns>;
    groupColumns: Ref<VxeGridPropTypes.Columns>;
}
export interface FetchDataOptions {
    propsData?: ListContent | {
        [key: string]: any;
    };
    extraParams?: {
        [key: string]: unknown;
    };
    pagerConfig?: VxeGridPropTypes.PagerConfig;
    isOrder?: ObjectMap;
    superQuery?: ObjectMap;
    formState?: ObjectMap;
    statusFilter?: ObjectMap;
    filter?: ObjectMap;
    getParams?: () => {
        [key: string]: unknown;
    };
    setPageDataToCache?: (value: ObjectMap) => void;
}
export interface CurrentRow {
    templateNumber: string;
    templateVersion: number;
    templateAccount: string;
    busAccount: string;
    elsAccount: string;
    [key: string]: unknown;
}
export interface ListOptionsEventParams {
    row: CurrentRow;
    optionItem?: OptColumnListItem;
    column: VxeGridPropTypes.Columns | VxeTableDefines.ColumnInfo;
    $rowIndex: number;
    $columnIndex: number;
}
export interface OptionsButtonsCallBack extends ListOptionsEventParams {
    click?: (params: ListOptionsEventParams) => void;
}
export type RemoveRowFunction = (options: {
    loading: Ref<boolean>;
    Request: qqtApi.Request;
    action?: string;
    params: {
        id: string | number | unknown;
    };
}, cb?: (res: any) => void) => Promise<void>;
export interface QueryParamsItem {
    logicSymbol?: string;
    fieldCode?: string;
    dictCode?: string;
    fieldType?: string;
    fieldValue?: string | number | unknown;
    showValue?: string | number;
    joiner?: string | number;
    dictTable?: string | number;
    customReturnField?: string | number;
    queryItemId?: string | number;
    extendLink?: string;
    extend?: {
        bindFunction?: <T>(discard: null, args: T) => void;
        [key: string]: unknown;
    };
    [key: string]: unknown;
}
export interface UserInfo {
    elsAccount: string;
    subAccount: string;
    serivceUrl: string;
    [key: string]: unknown;
}
export interface SearchPrompt {
    visible: boolean;
    form: {
        value: string | number;
    };
    formRules: any;
}
export interface SearchTreeDataItem {
    title: string | number;
    icon: string;
    records: QueryParamsItem[];
    id?: string;
}
export interface DictCodeItem {
    title: string;
    value: string;
    [key: string]: unknown;
}
export interface ExportXlsOptions {
    fileName?: string | unknown;
    loading?: ShallowRef<boolean>;
    pageData: PageData;
    pagerConfig: VxeGridPropTypes.PagerConfig;
    gridInstance: VxeTableInstance;
    listLayoutRef?: Ref;
    apiUrls: ApiUrls;
    exportType?: string;
    templateId?: string;
    templateNumberVersion?: string;
    otherDatas?: QueryCustomData;
    itemGroupCode?: string;
    jsonParam?: ObjectMap[];
    defineColumnCode?: string;
    exportXlsUrl?: string;
    extraParams?: ObjectMap | unknown;
    [key: string]: unknown;
}
export interface GridColumn {
    field?: string;
    property?: string;
    columnId?: string;
    sorter?: string;
    fixType?: string;
    hidden?: string;
    link?: string;
    fieldColors?: GridColors[] | string;
    [key: string]: any;
}
export interface GridColors {
    fieldName?: string;
    filterColor?: string;
    [key: string]: unknown;
}
export type SrmI18n = (i18nKey: string, defaultValue: string, account?: string | number) => string;
export interface ExposeByListButtons {
    updateListData: (params?: FetchDataOptions, customRequest?: qqtApi.Request) => void;
    loading: Ref<boolean>;
    listGridRef: Ref<VxeTableInstance>;
    Request: qqtApi.Request;
    srmI18n: SrmI18n;
}
export interface CreateGruopChatParams {
    [key: string]: unknown;
}
export interface RequestInfo {
    paramName: string;
    method: RequestMethod;
    [key: string]: unknown;
}
export interface RequestListInfo {
    url: string;
    method: RequestMethod;
    [key: string]: unknown;
}
export type RequestMethod = 'get' | 'post' | 'delete' | 'put';
