import { openBlock as n, createElementBlock as o, normalizeStyle as c, renderSlot as l, Fragment as s, renderList as g, createVNode as u, createCommentVNode as m } from "vue";
import { _ as h } from "./Shape-D3yIJobN.js";
import { _ as k } from "./_plugin-vue_export-helper-CHgC5LLL.js";
const y = ["id"], $ = { class: "vue-data-ui-legend-item" }, v = ["onClick", "height", "width"], S = {
  __name: "Legend",
  props: {
    legendSet: {
      type: Array,
      default() {
        return [];
      }
    },
    config: {
      type: Object,
      default() {
        return {};
      }
    },
    id: {
      type: String,
      default: ""
    }
  },
  emits: ["clickMarker"],
  setup(e, { emit: r }) {
    function f(i, d) {
      r("clickMarker", { legend: i, i: d });
    }
    return (i, d) => (n(), o("div", {
      id: e.id,
      class: "vue-data-ui-legend",
      style: c(`background:${e.config.backgroundColor};font-size:${e.config.fontSize}px;color:${e.config.color};padding-bottom:${e.config.paddingBottom}px;padding-top:${e.config.paddingTop || 12}px;font-weight:${e.config.fontWeight}`)
    }, [
      l(i.$slots, "legendTitle", { titleSet: e.legendSet }, void 0, !0),
      (n(!0), o(s, null, g(e.legendSet, (t, a) => (n(), o("div", $, [
        t.shape ? (n(), o("svg", {
          key: 0,
          onClick: (p) => f(t, a),
          height: e.config.fontSize,
          width: e.config.fontSize,
          viewBox: "0 0 20 20",
          style: c(`overflow: visible;opacity:${t.opacity}`)
        }, [
          u(h, {
            shape: t.shape,
            radius: 9,
            stroke: "none",
            plot: { x: 10, y: 10 },
            fill: t.color
          }, null, 8, ["shape", "fill"])
        ], 12, v)) : m("", !0),
        l(i.$slots, "item", {
          legend: t,
          index: a
        }, void 0, !0)
      ]))), 256))
    ], 12, y));
  }
}, z = /* @__PURE__ */ k(S, [["__scopeId", "data-v-a5a45422"]]);
export {
  z as L
};
