function __vite__mapDeps(indexes) {
  if (!__vite__mapDeps.viteFileDeps) {
    __vite__mapDeps.viteFileDeps = ["./index-dyx4v2bZ.js","./index-BKNuk68o.css"]
  }
  return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
}
import{d as b,an as g,ao as y,Q as S,i as h,a as B,ap as x,q as M,c as s,o as u,f as k,R as o,b as c,aw as C,_ as G}from"./index-dyx4v2bZ.js";import{u as L}from"./useListResources-DdhCMljT.js";const j={class:"BuilderGraphSelect--text"},q=b({__name:"BuilderGraphSelect",props:g({enableMultiSelection:{type:Boolean,required:!1}},{modelValue:{type:[String,Array],required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(i,{expose:p}){const m=y({loader:()=>S(()=>import("./index-dyx4v2bZ.js").then(e=>e.bC),__vite__mapDeps([0,1]),import.meta.url)}),v=h(B.core),l=x(i,"modelValue"),{load:f,data:t,isLoading:r}=L(v,"graphs");M(f);const _=s(()=>t.value.map(e=>({label:e.name,detail:e.description,value:e.id})).sort((e,a)=>e.label.localeCompare(a.label))),d=s({get(){return l.value===void 0?"":typeof l.value=="string"?l.value:l.value.join(",")},set(e){l.value=e.split(",")}}),V=s(()=>{if(l.value!==void 0)return typeof l.value=="string"?t.value.find(e=>e.id===l.value):t.value.filter(e=>l.value.includes(e.id))});return p({selectedData:V}),(e,a)=>(u(),k("div",j,[o(t).length>0||o(r)?(u(),c(o(m),{key:0,modelValue:l.value,"onUpdate:modelValue":a[0]||(a[0]=n=>l.value=n),options:_.value,"hide-icons":"","enable-search":"",loading:o(r),"enable-multi-selection":i.enableMultiSelection},null,8,["modelValue","options","loading","enable-multi-selection"])):(u(),c(C,{key:1,modelValue:d.value,"onUpdate:modelValue":a[1]||(a[1]=n=>d.value=n)},null,8,["modelValue"]))]))}}),I=G(q,[["__scopeId","data-v-088de614"]]);export{I as default};
