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