import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { useContext } from "react";
import { TradingPageProvider } from "./context/tradingPageContext";
import { MobileTradingPage } from "./mobile/trading";
import { DesktopTradingPage } from "./desktop/trading";
import { Layout } from "../../layout";
import { TopNavbar } from "../common/topNavbar";
import { Footer } from "../../layout/footer";
import { SystemStatusBar } from "../../block/systemStatusBar";
import { OrderlyAppContext } from "../../provider";
const { Header, Content, Sider, PageHeader } = Layout;
export const BaseTradingPage = (props)=>{
    const { footerStatusBarProps } = useContext(OrderlyAppContext);
    return /*#__PURE__*/ _jsx(TradingPageProvider, {
        symbol: props.symbol,
        onSymbolChange: props.onSymbolChange,
        disableFeatures: props.disableFeatures,
        children: /*#__PURE__*/ _jsxs(Layout, {
            mobile: /*#__PURE__*/ _jsx(MobileTradingPage, {
                ...props
            }),
            children: [
                /*#__PURE__*/ _jsx(Header, {
                    className: "orderly-app-trading-header orderly-border-b orderly-border-divider",
                    children: /*#__PURE__*/ _jsx(TopNavbar, {})
                }),
                /*#__PURE__*/ _jsx(Layout, {
                    style: {
                        paddingBottom: "42px"
                    },
                    children: /*#__PURE__*/ _jsx(Content, {
                        children: /*#__PURE__*/ _jsx(DesktopTradingPage, {
                            ...props
                        })
                    })
                }),
                /*#__PURE__*/ _jsx(Footer, {
                    fixed: true,
                    className: "orderly-bg-base-900 orderly-flex orderly-items-center orderly-px-4 orderly-w-full orderly-h-[42px] orderly-justify-between orderly-border-t-[1px] orderly-border-base-500 orderly-z-50",
                    children: /*#__PURE__*/ _jsx(SystemStatusBar, {
                        xUrl: footerStatusBarProps?.xUrl,
                        telegramUrl: footerStatusBarProps?.telegramUrl,
                        discordUrl: footerStatusBarProps?.discordUrl
                    })
                })
            ]
        })
    });
};

//# sourceMappingURL=page.js.map