import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { TabPane, Tabs } from "../../../../../tab";
import { useState } from "react";
import { MemorizedTradeHistoryFull } from "./tradingHistory";
import { MemorizedOrderBook } from "./orderbook";
import { SymbolProvider } from "../../../../../provider/symbolProvider";
export const MyOrderBookAndTrade = (props)=>{
    const [value, setValue] = useState("orderbook");
    return /*#__PURE__*/ _jsx(SymbolProvider, {
        symbol: props.symbol,
        children: /*#__PURE__*/ _jsxs(Tabs, {
            value: value,
            onTabChange: (value)=>setValue(value),
            allowUngroup: true,
            fullWidth: true,
            keepAlive: true,
            autoFit: true,
            minWidth: 300,
            tabBarClassName: "orderly-h-[48px] orderly-text-sm",
            children: [
                /*#__PURE__*/ _jsx(TabPane, {
                    title: "Orderbook",
                    value: "orderbook",
                    children: /*#__PURE__*/ _jsx(MemorizedOrderBook, {
                        symbol: props.symbol,
                        className: "orderly-pl-3"
                    })
                }),
                /*#__PURE__*/ _jsx(TabPane, {
                    title: "Last trades",
                    value: "tradeHistory",
                    children: /*#__PURE__*/ _jsx(MemorizedTradeHistoryFull, {
                        symbol: props.symbol
                    })
                })
            ]
        })
    });
};

//# sourceMappingURL=index.js.map