import { defineComponent as s, getCurrentInstance as n, h as t } from "vue";
import { useNamespace as a } from "@ibiz-template/vue-util";
import { ChartModel as i } from "@ibiz-template/model";
import { u as c } from "./use-chart-controller-d5d0d5a1.js";
import "@ibiz-template/controller";
import "qx-util";
import "echarts";
import "ramda";
import "@ibiz-template/service";
const g = s({
  name: "ChartControl",
  props: {
    modelData: {
      type: i,
      required: !0
    },
    context: {
      type: Object,
      required: !0
    },
    params: {
      type: Object,
      default: () => ({})
    }
  },
  setup(e) {
    const {
      proxy: r
    } = n(), o = a("chart");
    return {
      c: c(r, e.modelData, e.context, e.params),
      ns: o
    };
  },
  render() {
    if (this.c.complete)
      return t("control-layout", {
        attrs: {
          modelData: this.c.model
        }
      }, [t("div", {
        class: this.ns.b(),
        style: {
          width: this.c.width,
          height: this.c.height
        }
      }, [t("div", {
        attrs: {
          id: this.c.chartId
        },
        class: this.ns.b("content")
      }), this.c.items.length ? null : t("div", {
        class: this.ns.b("empty-content")
      }, ["暂无数据"])])]);
  }
});
export {
  g as default
};
