import { defineComponent as d, toRefs as _, reactive as C, onUnmounted as y, openBlock as r, createElementBlock as i, Fragment as u, renderList as s, unref as k, createBlock as v, createCommentVNode as x } from "vue";
import T from "./components/DigitalItem.mjs";
import B from "moment";
const E = { class: "times" }, I = d({ name: "ETime3d" }), A = /* @__PURE__ */ d({
  ...I,
  props: {
    chartConfig: {
      type: Object,
      required: !0
    }
  },
  setup(a) {
    const f = a, { times: h } = _(f.chartConfig.option), t = C({
      year: [],
      month: [],
      date: [],
      hour: [],
      minute: [],
      second: []
    });
    let m;
    function l() {
      m = setTimeout(() => {
        let e = B();
        t.year = n(e.year()), t.month = n(e.month()), t.date = n(e.date()), t.hour = n(e.hour()), t.minute = n(e.minute()), t.second = n(e.second()), l();
      }, 1e3);
    }
    l();
    function n(e) {
      let o = [];
      return e.toString().split("").forEach((c) => {
        o.push(parseInt(c));
      }), o.length == 1 && o.unshift(0), o;
    }
    return y(() => {
      clearTimeout(m);
    }), (e, o) => (r(), i("div", E, [
      (r(!0), i(u, null, s(t, (c, p, b) => (r(), i(u, null, [
        (r(!0), i(u, null, s(c, (g, j) => (r(), i(u, null, [
          k(h).includes(p) ? (r(), v(T, {
            key: 0,
            chartConfig: a.chartConfig,
            value: g
          }, null, 8, ["chartConfig", "value"])) : x("", !0)
        ], 64))), 256))
      ], 64))), 256))
    ]));
  }
});
export {
  A as default
};
