import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import React from "react";
import TimeInterval from "./timeInterval";
import DisplayControl from "./displayControl";
import { cn } from "../../../../../../utils";
const defaultIntervalMap = [
    {
        value: "1",
        label: "1m"
    },
    {
        value: "15",
        label: "15m"
    },
    {
        value: "60",
        label: "1h"
    },
    {
        value: "240",
        label: "4h"
    },
    {
        value: "1D",
        label: "1D"
    },
    {
        value: "1W",
        label: "1W"
    }
];
export default function TopBar({ changeInterval, changeDisplaySetting, interval, displayControlState }) {
    return /*#__PURE__*/ _jsxs("div", {
        className: "top-toolbar orderly-relative orderly-flex orderly-h-[36px] orderly-text-base-contrast-54 orderly-justify-between orderly-items-center orderly-px-4 orderly-border-b-[1px] orderly-border-base-contrast-8",
        children: [
            defaultIntervalMap.map((item)=>/*#__PURE__*/ _jsx("div", {
                    className: cn("orderly-text-2xs orderly-cursor-pointer", interval === item.value && "orderly-text-base-contrast"),
                    onClick: ()=>changeInterval(item.value),
                    children: item.label
                }, item.value)),
            /*#__PURE__*/ _jsx(TimeInterval, {
                timeInterval: interval,
                changeTimeInterval: changeInterval
            }),
            /*#__PURE__*/ _jsx(DisplayControl, {
                displayControlState: displayControlState,
                changeDisplayControlState: changeDisplaySetting
            })
        ]
    });
}

//# sourceMappingURL=topBar.js.map