import { defineComponent as i, toRefs as a, shallowReactive as y, watch as C, openBlock as w, createBlock as N, unref as e, withCtx as c, createVNode as S, normalizeStyle as T, createTextVNode as z, toDisplayString as n } from "vue";
import { NProgress as P, NText as k } from "naive-ui";
const B = i({ name: "EProcess" }), q = /* @__PURE__ */ i({
  ...B,
  props: {
    chartConfig: {
      type: Object,
      required: !0
    }
  },
  setup(s) {
    const t = s, { w: D, h: l } = a(t.chartConfig.attr), {
      type: p,
      unit: d,
      color: f,
      processing: g,
      railColor: h,
      indicatorTextColor: m,
      indicatorPlacement: u,
      indicatorTextSize: _,
      offsetDegree: x,
      dataset: R
    } = a(t.chartConfig.option), o = y({
      dataset: 36
    });
    return C(
      () => t.chartConfig.option.dataset,
      (r) => {
        o.dataset = r;
      },
      {
        deep: !1
      }
    ), (r, V) => (w(), N(e(P), {
      type: e(p),
      height: e(l),
      processing: e(g),
      percentage: e(o).dataset,
      "indicator-placement": e(u),
      color: e(f),
      "rail-color": e(h),
      "offset-degree": e(x)
    }, {
      default: c(() => [
        S(e(k), {
          style: T({
            color: e(m),
            fontSize: `${e(_)}px`
          })
        }, {
          default: c(() => [
            z(n(e(o).dataset) + " " + n(e(d)), 1)
          ]),
          _: 1
        }, 8, ["style"])
      ]),
      _: 1
    }, 8, ["type", "height", "processing", "percentage", "indicator-placement", "color", "rail-color", "offset-degree"]));
  }
});
export {
  q as default
};
