function __vite__mapDeps(indexes) {
  if (!__vite__mapDeps.viteFileDeps) {
    __vite__mapDeps.viteFileDeps = ["./BuilderSelect-DdIdCGqL.js","./index-ChhimAZ-.js","./index-_4WEo7c5.css","./floating-ui.vue-BNompikD.js","./BuilderSelect-CLys9Luh.css"]
  }
  return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
}
import{d as y,ay as b,i as g,a as B,az as S,m as M,c as s,o as i,e as x,M as t,b as c,ae as h,ab as k,L,_ as A}from"./index-ChhimAZ-.js";import{u as C}from"./useListResources-GOaOUbdv.js";import{B as G}from"./BuilderApp-CNfRViSf.js";import"./BaseTransitionSlideFade-Cz5sXvu2.js";import"./marked.esm-273vDTCT.js";const j={class:"BuilderGraphSelect--text"},E=y({__name:"BuilderGraphSelect",props:b({enableMultiSelection:{type:Boolean,required:!1}},{modelValue:{type:[String,Array],required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(r,{expose:m}){const p=k({loader:()=>L(()=>import("./BuilderSelect-DdIdCGqL.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url),loadingComponent:G}),v=g(B.core),l=S(r,"modelValue"),{load:f,data:o,isLoading:u}=C(v,"graphs");M(f);const _=s(()=>o.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"?o.value.find(e=>e.id===l.value):o.value.filter(e=>l.value.includes(e.id))});return m({selectedData:V}),(e,a)=>(i(),x("div",j,[t(o).length>0||t(u)?(i(),c(t(p),{key:0,modelValue:l.value,"onUpdate:modelValue":a[0]||(a[0]=n=>l.value=n),options:_.value,"hide-icons":"","enable-search":"",loading:t(u),"enable-multi-selection":r.enableMultiSelection},null,8,["modelValue","options","loading","enable-multi-selection"])):(i(),c(h,{key:1,modelValue:d.value,"onUpdate:modelValue":a[1]||(a[1]=n=>d.value=n)},null,8,["modelValue"]))]))}}),T=A(E,[["__scopeId","data-v-c05ad975"]]);export{T as default};
