import { jsx as _jsx } from "react/jsx-runtime";
import React, { useCallback } from "react";
import { modal } from "../../modal";
export const useAccountStatus = ()=>{
    const onSettle = useCallback(()=>{
        return modal.confirm({
            title: "Settle PnL",
            content: /*#__PURE__*/ _jsx("div", {
                className: "orderly-text-base-contrast-54 orderly-text-2xs",
                children: "Are you sure you want to settle your PnL? Settlement will take up to 1 minute before you can withdraw your available balance."
            }),
            onCancel: ()=>{
                return Promise.reject();
            },
            onOk: ()=>{
                // @ts-ignore
                if (typeof props.onSettle !== "function") return Promise.resolve();
                // @ts-ignore
                return props.onSettle().catch((e)=>{});
            }
        });
    }, []);
    return {
        onSettle
    };
};

//# sourceMappingURL=useAccountStatus.js.map