import { defineComponent as F, toRefs as k, ref as r, openBlock as E, createElementBlock as S, createElementVNode as u, createVNode as e, unref as t, withCtx as a, createTextVNode as c, toDisplayString as f } from "vue";
import o from "../../../NComponents/configCommon/refConfig.vue_vue_type_script_setup_true_lang.mjs";
import T from "./images/time.mjs";
import m from "moment";
const A = { class: "weather" }, R = F({ name: "EHeaderTime" }), W = /* @__PURE__ */ F({
  ...R,
  props: {
    chartConfig: {
      type: Object,
      required: !0
    }
  },
  setup(_) {
    var d;
    const C = _;
    let h = {
      timeImageConfig: {
        imgSrc: T,
        width: 34,
        height: 34
      },
      timeTitleConfig: {
        fontSize: 27,
        fontWeight: "bold",
        fontFamily: "Bureau Agency FB",
        gradient: {
          from: "RGBA(206, 233, 246, 1)",
          to: "RGBA(246, 251, 253, 1)"
        }
      },
      dateConfig: {
        fontSize: 27,
        fontWeight: "bold",
        gradient: {
          from: "RGBA(206, 233, 246, 1)",
          to: "RGBA(246, 251, 253, 1)"
        }
      },
      weekConfig: {
        fontSize: 22,
        fontWeight: "bold",
        fontFamily: "SourceHanSansSC",
        gradient: {
          from: "RGBA(206, 233, 246, 1)",
          to: "RGBA(246, 251, 253, 1)"
        }
      }
    };
    const { timeTitleConfig: x, timeImageConfig: B, dateConfig: v, weekConfig: y } = k(
      ((d = C.chartConfig) == null ? void 0 : d.option) || h
    ), s = r(""), g = r(""), l = r("");
    ((n) => {
      let i = (p) => {
        setTimeout(() => {
          s.value = w(), g.value = m().format("HH:mm:ss"), l.value = m().format("YYYY-MM-DD"), i(p);
        }, p);
      };
      i(n);
    })(1e3);
    const w = () => {
      switch (m().day()) {
        case 1:
          return "\u661F\u671F\u4E00";
        case 2:
          return "\u661F\u671F\u4E8C";
        case 3:
          return "\u661F\u671F\u4E09";
        case 4:
          return "\u661F\u671F\u56DB";
        case 5:
          return "\u661F\u671F\u4E94";
        case 6:
          return "\u661F\u671F\u516D";
        case 0:
          return "\u661F\u671F\u65E5";
      }
    };
    return (n, i) => (E(), S("div", A, [
      u("div", null, [
        e(o, {
          config: t(B),
          type: "img",
          class: "img"
        }, null, 8, ["config"]),
        e(o, {
          config: t(x),
          type: "text"
        }, {
          text: a(() => [
            c(f(g.value), 1)
          ]),
          _: 1
        }, 8, ["config"])
      ]),
      u("div", null, [
        e(o, {
          config: t(v),
          type: "text"
        }, {
          text: a(() => [
            c(f(l.value), 1)
          ]),
          _: 1
        }, 8, ["config"])
      ]),
      u("div", null, [
        e(o, {
          config: t(y),
          type: "text"
        }, {
          text: a(() => [
            c(f(s.value), 1)
          ]),
          _: 1
        }, 8, ["config"])
      ])
    ]));
  }
});
export {
  W as default
};
