"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "LimitConfirmDialog", {
    enumerable: true,
    get: function() {
        return LimitConfirmDialog;
    }
});
const _jsxruntime = require("react/jsx-runtime");
const _confirmHeader = require("./confirmHeader");
const _confrimFooter = require("./confrimFooter");
const _text = require("../../../text");
const _divider = require("../../../divider");
const _networkImage = require("../../../icon/networkImage");
const _orderDetail = require("../shared/orderDetail");
const _utils = require("@orderly.network/utils");
const LimitConfirmDialog = (props)=>{
    const { order, quote } = props;
    const { side } = order;
    const onCancel = ()=>{
        props.onClose();
    };
    return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
        children: [
            /*#__PURE__*/ (0, _jsxruntime.jsx)(_confirmHeader.ConfirmHeader, {
                onClose: onCancel,
                title: "Limit close"
            }),
            /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
                className: "orderly-text-base-contrast orderly-text-sm orderly-mt-5",
                children: `You agree closing ${(0, _utils.commify)(props.quantity)} ${props.base} position at limit price.`
            }),
            /*#__PURE__*/ (0, _jsxruntime.jsx)(_divider.Divider, {
                className: "orderly-my-4"
            }),
            /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
                className: "orderly-flex orderly-mb-4 orderly-gap-2",
                children: [
                    /*#__PURE__*/ (0, _jsxruntime.jsx)(_networkImage.NetworkImage, {
                        type: "symbol",
                        symbol: order.symbol
                    }),
                    /*#__PURE__*/ (0, _jsxruntime.jsx)(_text.Text, {
                        rule: "symbol",
                        children: order.symbol
                    })
                ]
            }),
            /*#__PURE__*/ (0, _jsxruntime.jsx)(_orderDetail.OrderDetail, {
                className: "orderly-text-sm",
                order: props.order,
                quote: props.quote
            }),
            /*#__PURE__*/ (0, _jsxruntime.jsx)(_confrimFooter.ConfirmFooter, {
                onCancel: onCancel,
                onConfirm: props.onConfirm,
                submitting: props.submitting
            })
        ]
    });
};

//# sourceMappingURL=limitConfirmDialog.js.map