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

//# sourceMappingURL=tabTitle.js.map