"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
function _export(target, all) {
    for(var name in all)Object.defineProperty(target, name, {
        enumerable: true,
        get: all[name]
    });
}
_export(exports, {
    DesktopFreeCollat: function() {
        return DesktopFreeCollat;
    },
    FreeCollat: function() {
        return FreeCollat;
    },
    MobileFreeCollat: function() {
        return MobileFreeCollat;
    }
});
const _jsxruntime = require("react/jsx-runtime");
const _divider = require("../../../divider");
const _tooltip = require("../../../tooltip");
const _utils = require("../../../utils");
const _hooks = require("@orderly.network/hooks");
const _types = require("@orderly.network/types");
const FreeCollat = ()=>{
    const isTable = (0, _hooks.useMediaQuery)(_types.MEDIA_TABLET);
    return isTable ? /*#__PURE__*/ (0, _jsxruntime.jsx)(MobileFreeCollat, {}) : /*#__PURE__*/ (0, _jsxruntime.jsx)(DesktopFreeCollat, {
        title: "Available"
    });
};
const MobileFreeCollat = ()=>{
    return /*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
        children: "Available"
    });
};
const DesktopFreeCollat = (props)=>{
    return /*#__PURE__*/ (0, _jsxruntime.jsx)(_tooltip.Tooltip, {
        // @ts-ignore
        content: /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
            children: [
                /*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
                    children: "Free collateral for placing new orders."
                }),
                /*#__PURE__*/ (0, _jsxruntime.jsx)(_divider.Divider, {
                    className: "orderly-py-2 orderly-border-white/10"
                }),
                /*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
                    children: "Free collateral = Total balance + Total unsettlement PnL - Total position initial margin"
                })
            ]
        }),
        className: "orderly-max-w-[270px]",
        children: /*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
            className: (0, _utils.cn)("orderly-text-base-contrast-54 orderly-text-2xs orderly-cursor-pointer", props.className && props.className),
            children: props.title
        })
    });
};

//# sourceMappingURL=freeCollat.js.map