"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, {
    MemoizedTPSLTabTitle: function() {
        return MemoizedTPSLTabTitle;
    },
    TPSLTabTitle: function() {
        return TPSLTabTitle;
    }
});
const _jsxruntime = require("react/jsx-runtime");
const _types = require("@orderly.network/types");
const _hooks = require("@orderly.network/hooks");
const _react = require("react");
const TPSLTabTitle = ()=>{
    const [_, { total }] = (0, _hooks.useOrderStream)({
        status: _types.OrderStatus.INCOMPLETE,
        includes: [
            _types.AlgoOrderRootType.POSITIONAL_TP_SL,
            _types.AlgoOrderRootType.TP_SL
        ]
    }, {
        keeplive: true
    });
    if (total === 0) {
        return /*#__PURE__*/ (0, _jsxruntime.jsx)(_jsxruntime.Fragment, {
            children: "TP/SL"
        });
    }
    return /*#__PURE__*/ (0, _jsxruntime.jsx)(_jsxruntime.Fragment, {
        children: `TP/SL(${total})`
    });
};
const MemoizedTPSLTabTitle = /*#__PURE__*/ (0, _react.memo)(TPSLTabTitle);

//# sourceMappingURL=tpslTabTitle.js.map