import type { Ref } from 'vue';
import type { PageButtonArgsFunctionType, PageButtonPayload, UsePromiseStepPayload,  ExposeWithPageButtons,  RecordString,  PageButton,  ValidateResult } from '../../../edit-page-layout';
export default function usePromiseStep<T extends UsePromiseStepPayload>(payload: T): {
    localUid: Ref<number>;
    cacheButton: Ref<{
        title: string;
        i18nKey?: string | undefined;
        key: string | symbol;
        args: PageButtonArgsFunctionType | {
            [x: string]: unknown;
            url: string;
        };
        authorityCode?: string | undefined;
        attrs?: RecordString | undefined;
        icon?: {
            type: string;
            size: number;
            color?: string | undefined;
        } | undefined;
        emit?: boolean | undefined;
        emitKey?: string | undefined;
        showMessage?: boolean | undefined;
        checkBefore?: boolean | undefined;
        confirm?: {
            title: string;
            content: string;
        } | undefined;
        dropdown?: boolean | undefined;
        isExistFrozenSource?: boolean | undefined;
        isExistFrozenSourceUrl?: string | undefined;
        isExistFrozenSourceParams?: ((pageData: RecordString) => RecordString) | undefined;
        disabled?: ((pageData: RecordString) => boolean) | undefined;
        handleBefore?: ((args: ExposeWithPageButtons) => Promise<ExposeWithPageButtons>) | undefined;
        handleAfter?: ((args: ExposeWithPageButtons) => Promise<ExposeWithPageButtons>) | undefined;
        callback?: ((payload: PageButtonPayload) => void) | undefined;
    }>;
    customLoading: Readonly<Ref<boolean>>;
    normalizeStepPromiseMethod: <T_1 extends ExposeWithPageButtons>(key: string | symbol) => ((args: T_1) => Promise<ExposeWithPageButtons>)[];
    handleResetValidateStatus: () => void;
    handleValidateResult: ({ result, button }: ValidateResult) => void;
    stepSave: (args: ExposeWithPageButtons) => Promise<ExposeWithPageButtons>;
    stepAdd: (args: ExposeWithPageButtons) => Promise<ExposeWithPageButtons>;
    handleSetCacheButton: (btn: PageButton) => void;
    handleSetCachePageData: (data: RecordString) => void;
    handleSetCacheRefresh: (refresh: boolean) => void;
    handleSetCacheShowMessage: (show: boolean) => void;
    stepTriggerValidate: () => void;
    stepHideMessage: (args: ExposeWithPageButtons) => Promise<ExposeWithPageButtons>;
    stepShowMessage: (args: ExposeWithPageButtons) => Promise<ExposeWithPageButtons>;
    stepCheckBeforePublish: (args: ExposeWithPageButtons) => Promise<ExposeWithPageButtons>;
    stepCheckBeforeSubmit: (args: ExposeWithPageButtons) => Promise<ExposeWithPageButtons>;
    stepIsExistFrozenSource: (args: ExposeWithPageButtons) => Promise<ExposeWithPageButtons>;
    stepConfirmPublish: (args: ExposeWithPageButtons) => Promise<ExposeWithPageButtons>;
    stepConfirmSubmit: (args: ExposeWithPageButtons) => Promise<ExposeWithPageButtons>;
    stepPublish: (args: ExposeWithPageButtons) => Promise<ExposeWithPageButtons>;
    stepSubmit: (args: ExposeWithPageButtons) => Promise<ExposeWithPageButtons>;
    promiseSaveSteps: () => Promise<ExposeWithPageButtons>;
    composeSave: () => void;
    composePublish: () => void;
    restOfPublish: () => void;
    composeSubmit: () => void;
    restOfSubmit: () => void;
    composeConfirm: (refresh?: boolean) => void;
    restOfConfirm: () => void;
    composeReject: () => void;
    composeCancelAudit: () => void;
    composeFlowView: () => void;
    stepCancelAuditModal: (args: ExposeWithPageButtons) => Promise<ExposeWithPageButtons>;
    stepCancelAudit: (args: ExposeWithPageButtons) => Promise<ExposeWithPageButtons>;
    stepFlowView: (args: ExposeWithPageButtons) => Promise<ExposeWithPageButtons>;
};
