import { defineComponent, useCssVars, unref, ref, toRefs, openBlock, createElementBlock, createElementVNode, toDisplayString } from "vue";
import moment from "moment";
import "./index.vue_vue_type_style_index_0_scoped_true_lang.mjs";
import _export_sfc from "../../../../_virtual/plugin-vue_export-helper.mjs";
const _hoisted_1 = { class: "header" };
const _hoisted_2 = { class: "title" };
const _hoisted_3 = { class: "time" };
const __default__ = defineComponent({ name: "EHeader01" });
const _sfc_main = /* @__PURE__ */ defineComponent({
  ...__default__,
  props: {
    chartConfig: {
      type: Object,
      required: true
    }
  },
  setup(__props) {
    const props = __props;
    useCssVars((_ctx) => ({
      "4b3e63f6": unref(titleSize) + "px",
      "6ab1e3e6": unref(titleColor),
      "b0993e4c": unref(timeSize) + "px",
      "7f4e9222": unref(timeRight) + "px",
      "0cf90554": unref(timeTop) + "px",
      "32fdad8a": unref(timeColor)
    }));
    let dest = ref();
    const fun = () => {
      let time = moment().format("YYYY-MM-DD HH:mm:ss");
      return time;
    };
    setInterval(() => {
      dest.value = fun();
    }, 1e3);
    const {
      titleText,
      titleColor,
      titleSize,
      timeSize,
      timeColor,
      timeTop,
      timeRight
    } = toRefs(props.chartConfig.option);
    return (_ctx, _cache) => {
      return openBlock(), createElementBlock("div", _hoisted_1, [
        createElementVNode("div", _hoisted_2, toDisplayString(unref(titleText)), 1),
        createElementVNode("div", _hoisted_3, toDisplayString(unref(dest)), 1)
      ]);
    };
  }
});
var _EHeader01 = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-1b2a3932"]]);
export { _EHeader01 as default };
