import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
import { AlgoOrderRootType, OrderStatus } from "@orderly.network/types";
import { useOrderStream } from "@orderly.network/hooks";
import { memo } from "react";
export const OrdersTabTitle = (props)=>{
    const { excludes = [
        AlgoOrderRootType.POSITIONAL_TP_SL,
        AlgoOrderRootType.TP_SL
    ] } = props;
    const [_, { total }] = useOrderStream({
        status: OrderStatus.INCOMPLETE,
        excludes
    }, {
        keeplive: true
    });
    if (total === 0) {
        return /*#__PURE__*/ _jsx(_Fragment, {
            children: "Pending"
        });
    }
    return /*#__PURE__*/ _jsx(_Fragment, {
        children: `Pending(${total})`
    });
};
export const MemoizedOrdersTabTitle = /*#__PURE__*/ memo(OrdersTabTitle);

//# sourceMappingURL=tabTitle.js.map