import { defineComponent as u, computed as n, createElementBlock as r, openBlock as l, normalizeClass as c, createCommentVNode as m, createVNode as d, createBlock as g, toDisplayString as v } from "vue";
import p from "./StackedRow.vue.js";
import k from "./Legends.vue.js";
const x = /* @__PURE__ */ u({
  __name: "PlChartStackedBar",
  props: {
    settings: {}
  },
  setup(t) {
    const s = t, i = n(() => s.settings.showLegends ?? !0), o = n(() => s.settings.data ?? []), a = n(() => o.value.map((e) => ({
      color: e.color,
      text: e.label
    })));
    return (e, f) => (l(), r("div", {
      class: c(e.$style.component)
    }, [
      t.settings.title ? (l(), r("div", {
        key: 0,
        class: c(e.$style.title)
      }, v(t.settings.title), 3)) : m("", !0),
      d(p, { value: o.value }, null, 8, ["value"]),
      i.value && a.value.length ? (l(), g(k, {
        key: 1,
        legends: a.value,
        "max-in-column": t.settings.maxLegendsInColumn
      }, null, 8, ["legends", "max-in-column"])) : m("", !0)
    ], 2));
  }
});
export {
  x as default
};
//# sourceMappingURL=PlChartStackedBar.vue2.js.map
