import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
import { ConfirmHeader } from "./confirmHeader";
import { ConfirmFooter } from "./confrimFooter";
import { Text } from "../../../text";
import { Divider } from "../../../divider";
import { NetworkImage } from "../../../icon/networkImage";
import { OrderDetail } from "../shared/orderDetail";
import { commify } from "@orderly.network/utils";
export const LimitConfirmDialog = (props)=>{
    const { order, quote } = props;
    const { side } = order;
    const onCancel = ()=>{
        props.onClose();
    };
    return /*#__PURE__*/ _jsxs(_Fragment, {
        children: [
            /*#__PURE__*/ _jsx(ConfirmHeader, {
                onClose: onCancel,
                title: "Limit close"
            }),
            /*#__PURE__*/ _jsx("div", {
                className: "orderly-text-base-contrast orderly-text-sm orderly-mt-5",
                children: `You agree closing ${commify(props.quantity)} ${props.base} position at limit price.`
            }),
            /*#__PURE__*/ _jsx(Divider, {
                className: "orderly-my-4"
            }),
            /*#__PURE__*/ _jsxs("div", {
                className: "orderly-flex orderly-mb-4 orderly-gap-2",
                children: [
                    /*#__PURE__*/ _jsx(NetworkImage, {
                        type: "symbol",
                        symbol: order.symbol
                    }),
                    /*#__PURE__*/ _jsx(Text, {
                        rule: "symbol",
                        children: order.symbol
                    })
                ]
            }),
            /*#__PURE__*/ _jsx(OrderDetail, {
                className: "orderly-text-sm",
                order: props.order,
                quote: props.quote
            }),
            /*#__PURE__*/ _jsx(ConfirmFooter, {
                onCancel: onCancel,
                onConfirm: props.onConfirm,
                submitting: props.submitting
            })
        ]
    });
};

//# sourceMappingURL=limitConfirmDialog.js.map