"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "default", {
    enumerable: true,
    get: function() {
        return TopBar;
    }
});
const _jsxruntime = require("react/jsx-runtime");
const _react = /*#__PURE__*/ _interop_require_default(require("react"));
const _timeInterval = /*#__PURE__*/ _interop_require_default(require("./timeInterval"));
const _displayControl = /*#__PURE__*/ _interop_require_default(require("./displayControl"));
const _utils = require("../../../../../../utils");
function _interop_require_default(obj) {
    return obj && obj.__esModule ? obj : {
        default: obj
    };
}
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"
    }
];
function TopBar({ changeInterval, changeDisplaySetting, interval, displayControlState }) {
    return /*#__PURE__*/ (0, _jsxruntime.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__*/ (0, _jsxruntime.jsx)("div", {
                    className: (0, _utils.cn)("orderly-text-2xs orderly-cursor-pointer", interval === item.value && "orderly-text-base-contrast"),
                    onClick: ()=>changeInterval(item.value),
                    children: item.label
                }, item.value)),
            /*#__PURE__*/ (0, _jsxruntime.jsx)(_timeInterval.default, {
                timeInterval: interval,
                changeTimeInterval: changeInterval
            }),
            /*#__PURE__*/ (0, _jsxruntime.jsx)(_displayControl.default, {
                displayControlState: displayControlState,
                changeDisplayControlState: changeDisplaySetting
            })
        ]
    });
}

//# sourceMappingURL=topBar.js.map