import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { TabPane, Tabs } from "../../../../../tab";
import React, { useState } from "react";
import { PositionPane } from "./position";
import { OrdersPane } from "../../../../../page/trading/mobile/sections/dataList/orders";
import { HistoryPane } from "./history";
import { PositionTabTitle } from "./position/tabTitle";
import { MemoizedOrdersTabTitle } from "./orders/tabTitle";
import { TPSLTabTitle } from "../../../../../page/trading/desktop/sections/datalist/tpslTabTitle";
import { AlgoOrderRootType } from "@orderly.network/types";
export const DataListView = ()=>{
    const [activeTab, setActiveTab] = useState("positions");
    return /*#__PURE__*/ _jsxs(Tabs, {
        id: "orderly-data-list",
        value: activeTab,
        onTabChange: setActiveTab,
        tabBarClassName: "orderly-data-list-tab-bar orderly-bg-base-900 orderly-text-3xs",
        children: [
            /*#__PURE__*/ _jsx(TabPane, {
                title: /*#__PURE__*/ _jsx(PositionTabTitle, {}),
                value: "positions",
                id: "orderly-data-list-positions",
                children: /*#__PURE__*/ _jsx(PositionPane, {})
            }),
            /*#__PURE__*/ _jsx(TabPane, {
                title: /*#__PURE__*/ _jsx(MemoizedOrdersTabTitle, {}),
                value: "orders",
                id: "orderly-data-list-pending",
                children: /*#__PURE__*/ _jsx(OrdersPane, {
                    excludes: [
                        AlgoOrderRootType.POSITIONAL_TP_SL,
                        AlgoOrderRootType.TP_SL
                    ]
                })
            }),
            /*#__PURE__*/ _jsx(TabPane, {
                title: /*#__PURE__*/ _jsx(TPSLTabTitle, {}),
                value: "tpsl",
                id: "orderly-tpsl-list-pending",
                children: /*#__PURE__*/ _jsx(OrdersPane, {
                    includes: [
                        AlgoOrderRootType.POSITIONAL_TP_SL,
                        AlgoOrderRootType.TP_SL
                    ]
                })
            }),
            /*#__PURE__*/ _jsx(TabPane, {
                title: "History",
                value: "history",
                id: "orderly-data-list-history",
                children: /*#__PURE__*/ _jsx(HistoryPane, {})
            })
        ]
    });
};

//# sourceMappingURL=index.js.map