import { ElLoading, ElMessage, ElMessageBox } from 'element-plus';
import { default as cloneDeep } from 'lodash/cloneDeep';
import { formatToMoney } from '../utils/format';
import { isEmpty, lenLimit, required } from '../plugins';

export interface HttpResponseList<T> {
    data: {
        list: T[];
    };
    code?: string | number | undefined;
    msg?: string;
}
export interface HttpResponse<T> {
    data: T;
}
export type AnyFunc<T = any> = (...args: any[]) => T;
export type PureObject<T = any> = Record<string | number | symbol, T>;
export type PureListObject<T = any> = PureObject<T[]>;
export interface QdllVueCustomProperties {
    $required: typeof required;
    $toMoney: typeof formatToMoney;
    $cloneDeep: typeof cloneDeep;
    $lenLimit: typeof lenLimit;
    $isEmpty: typeof isEmpty;
}
export interface CombineVue3Propperties extends QdllVueCustomProperties {
    $message: typeof ElMessage;
    $msgbox: typeof ElMessageBox;
    $alert: typeof ElMessageBox.alert;
    $confirm: typeof ElMessageBox.confirm;
    $prompt: typeof ElMessageBox.prompt;
    $loading: typeof ElLoading.service;
}
declare module "@vue/runtime-core" {
    interface ComponentCustomProperties {
        $required: typeof required;
        $toMoney: typeof formatToMoney;
        $cloneDeep: typeof cloneDeep;
        $lenLimit: typeof lenLimit;
        $isEmpty: typeof isEmpty;
    }
}
declare global {
    interface Window {
        $routerGo: AnyFunc;
    }
}
