"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "DataListView", {
    enumerable: true,
    get: function() {
        return DataListView;
    }
});
const _jsxruntime = require("react/jsx-runtime");
const _tab = require("../../../../../tab");
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
const _position = require("./position");
const _orders = require("../../../../../page/trading/mobile/sections/dataList/orders");
const _history = require("./history");
const _tabTitle = require("./position/tabTitle");
const _tabTitle1 = require("./orders/tabTitle");
const _tpslTabTitle = require("../../../../../page/trading/desktop/sections/datalist/tpslTabTitle");
const _types = require("@orderly.network/types");
function _getRequireWildcardCache(nodeInterop) {
    if (typeof WeakMap !== "function") return null;
    var cacheBabelInterop = new WeakMap();
    var cacheNodeInterop = new WeakMap();
    return (_getRequireWildcardCache = function(nodeInterop) {
        return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
    })(nodeInterop);
}
function _interop_require_wildcard(obj, nodeInterop) {
    if (!nodeInterop && obj && obj.__esModule) {
        return obj;
    }
    if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
        return {
            default: obj
        };
    }
    var cache = _getRequireWildcardCache(nodeInterop);
    if (cache && cache.has(obj)) {
        return cache.get(obj);
    }
    var newObj = {
        __proto__: null
    };
    var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
    for(var key in obj){
        if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
            var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
            if (desc && (desc.get || desc.set)) {
                Object.defineProperty(newObj, key, desc);
            } else {
                newObj[key] = obj[key];
            }
        }
    }
    newObj.default = obj;
    if (cache) {
        cache.set(obj, newObj);
    }
    return newObj;
}
const DataListView = ()=>{
    const [activeTab, setActiveTab] = (0, _react.useState)("positions");
    return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_tab.Tabs, {
        id: "orderly-data-list",
        value: activeTab,
        onTabChange: setActiveTab,
        tabBarClassName: "orderly-data-list-tab-bar orderly-bg-base-900 orderly-text-3xs",
        children: [
            /*#__PURE__*/ (0, _jsxruntime.jsx)(_tab.TabPane, {
                title: /*#__PURE__*/ (0, _jsxruntime.jsx)(_tabTitle.PositionTabTitle, {}),
                value: "positions",
                id: "orderly-data-list-positions",
                children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_position.PositionPane, {})
            }),
            /*#__PURE__*/ (0, _jsxruntime.jsx)(_tab.TabPane, {
                title: /*#__PURE__*/ (0, _jsxruntime.jsx)(_tabTitle1.MemoizedOrdersTabTitle, {}),
                value: "orders",
                id: "orderly-data-list-pending",
                children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_orders.OrdersPane, {
                    excludes: [
                        _types.AlgoOrderRootType.POSITIONAL_TP_SL,
                        _types.AlgoOrderRootType.TP_SL
                    ]
                })
            }),
            /*#__PURE__*/ (0, _jsxruntime.jsx)(_tab.TabPane, {
                title: /*#__PURE__*/ (0, _jsxruntime.jsx)(_tpslTabTitle.TPSLTabTitle, {}),
                value: "tpsl",
                id: "orderly-tpsl-list-pending",
                children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_orders.OrdersPane, {
                    includes: [
                        _types.AlgoOrderRootType.POSITIONAL_TP_SL,
                        _types.AlgoOrderRootType.TP_SL
                    ]
                })
            }),
            /*#__PURE__*/ (0, _jsxruntime.jsx)(_tab.TabPane, {
                title: "History",
                value: "history",
                id: "orderly-data-list-history",
                children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_history.HistoryPane, {})
            })
        ]
    });
};

//# sourceMappingURL=index.js.map