"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "LeverageView", {
    enumerable: true,
    get: function() {
        return LeverageView;
    }
});
const _jsxruntime = require("react/jsx-runtime");
const _button = /*#__PURE__*/ _interop_require_default(require("../../button"));
const _icon = require("../../icon");
function _interop_require_default(obj) {
    return obj && obj.__esModule ? obj : {
        default: obj
    };
}
const LeverageView = ({ maxLeverage, predFundingRate, countdown, onShowLeverageInfo })=>{
    return /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
        id: "orderly-leverage",
        className: "orderly-flex orderly-justify-between orderly-items-center orderly-text-3xs",
        children: [
            /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
                className: "orderly-text-4xs orderly-text-base-contrast-36 orderly-flex orderly-items-center",
                children: [
                    /*#__PURE__*/ (0, _jsxruntime.jsxs)("button", {
                        className: "orderly-flex orderly-items-center orderly-gap-1",
                        onClick: ()=>onShowLeverageInfo?.(),
                        children: [
                            /*#__PURE__*/ (0, _jsxruntime.jsx)(_icon.InfoIcon, {
                                size: 14
                            }),
                            /*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
                                children: "Max leverage"
                            })
                        ]
                    }),
                    /*#__PURE__*/ (0, _jsxruntime.jsx)(_button.default, {
                        variant: "text",
                        size: "small",
                        className: "orderly-px-1 orderly-min-w-[24px] orderly-text-4xs orderly-text-link",
                        children: `${maxLeverage}x`
                    })
                ]
            }),
            /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
                className: "orderly-flex orderly-flex-col orderly-items-end orderly-text-4xs orderly-text-base-contrast-36",
                children: [
                    /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
                        children: "Pred. funding rate"
                    }),
                    /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
                        className: "orderly-flex orderly-gap-1",
                        children: [
                            /*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
                                className: "orderly-text-warning",
                                children: `${predFundingRate}%`
                            }),
                            /*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
                                children: "in"
                            }),
                            /*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
                                children: countdown
                            })
                        ]
                    })
                ]
            })
        ]
    });
};

//# sourceMappingURL=leverage.js.map