"use strict";const e=require("vue"),r=require("./Shape-rA2az7tR.cjs"),d=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),u=["id"],s=["onClick","height","width"],f={__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(t,{emit:c}){function a(i,o){c("clickMarker",{legend:i,i:o})}return(i,o)=>(e.openBlock(),e.createElementBlock("div",{id:t.id,class:"vue-data-ui-legend",style:e.normalizeStyle(`background:${t.config.backgroundColor};font-size:${t.config.fontSize}px;color:${t.config.color};padding-bottom:${t.config.paddingBottom}px;padding-top:${t.config.paddingTop||12}px;font-weight:${t.config.fontWeight}`)},[e.renderSlot(i.$slots,"legendTitle",{titleSet:t.legendSet},void 0,!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.legendSet,(n,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass({"vue-data-ui-legend-item":!0,active:t.clickable})},[n.shape?(e.openBlock(),e.createElementBlock("svg",{key:0,onClick:k=>a(n,l),height:t.config.fontSize,width:t.config.fontSize,viewBox:"0 0 20 20",style:e.normalizeStyle(`overflow: visible;opacity:${n.opacity}`)},[e.createVNode(r._sfc_main,{shape:n.shape,radius:9,stroke:"none",plot:{x:10,y:10},fill:n.color},null,8,["shape","fill"])],12,s)):e.createCommentVNode("",!0),e.renderSlot(i.$slots,"item",{legend:n,index:l},void 0,!0)],2))),256))],12,u))}},g=d._export_sfc(f,[["__scopeId","data-v-310b3d7d"]]);exports.Legend=g;
