import { ChartPortletModel as s } from "@ibiz-template/model";
import { useNamespace as l } from "@ibiz-template/vue-util";
import { defineComponent as m, h as o } from "vue";
import { C as c } from "./index-42d80035.js";
import "@ibiz-template/runtime";
import "@ibiz-template/controller";
const f = m({
  name: "ChartPortlet",
  props: {
    modelData: {
      type: s,
      required: !0
    },
    controller: {
      type: c,
      required: !0
    }
  },
  setup() {
    return {
      ns: l("chart-portlet")
    };
  },
  render() {
    const t = this.controller;
    let r = null;
    const {
      chart: e
    } = t.model;
    t.chartProvider && (r = o(t.chartProvider.component, {
      props: {
        modelData: e,
        context: t.context,
        params: t.params
      },
      on: {
        neuronInit: (a) => {
          t.setChartNeuron(a);
        }
      }
    }));
    const n = [this.ns.b(), this.ns.m(this.modelData.modelClass)];
    return o("portlet-layout", {
      attrs: {
        controller: this.controller
      },
      class: n
    }, [r]);
  }
});
export {
  f as default
};
