import { openBlock as n, createElementBlock as o, normalizeStyle as c, renderSlot as d, Fragment as u, renderList as s, normalizeClass as g, createVNode as m, createCommentVNode as h } from "vue";
import { _ as k } from "./Shape-C-sY_hlc.js";
import { _ as y } from "./_plugin-vue_export-helper-CHgC5LLL.js";
const v = ["id"], $ = ["onClick", "height", "width"], S = {
  __name: "Legend",
  props: {
    legendSet: {
      type: Array,
      default() {
        return [];
      }
    },
    config: {
      type: Object,
      default() {
        return {};
      }
    },
    id: {
      type: String,
      default: ""
    },
    clickable: {
      type: Boolean,
      default: !0
    }
  },
  emits: ["clickMarker"],
  setup(e, { emit: r }) {
    function f(i, l) {
      r("clickMarker", { legend: i, i: l });
    }
    return (i, l) => (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}`)
    }, [
      d(i.$slots, "legendTitle", { titleSet: e.legendSet }, void 0, !0),
      (n(!0), o(u, null, s(e.legendSet, (t, a) => (n(), o("div", {
        class: g({ "vue-data-ui-legend-item": !0, active: e.clickable })
      }, [
        t.shape ? (n(), o("svg", {
          key: 0,
          onClick: (b) => f(t, a),
          height: e.config.fontSize,
          width: e.config.fontSize,
          viewBox: "0 0 20 20",
          style: c(`overflow: visible;opacity:${t.opacity}`)
        }, [
          m(k, {
            shape: t.shape,
            radius: 9,
            stroke: "none",
            plot: { x: 10, y: 10 },
            fill: t.color
          }, null, 8, ["shape", "fill"])
        ], 12, $)) : h("", !0),
        d(i.$slots, "item", {
          legend: t,
          index: a
        }, void 0, !0)
      ], 2))), 256))
    ], 12, v));
  }
}, C = /* @__PURE__ */ y(S, [["__scopeId", "data-v-310b3d7d"]]);
export {
  C as L
};
