function __vite__mapDeps(indexes) {
  if (!__vite__mapDeps.viteFileDeps) {
    __vite__mapDeps.viteFileDeps = ["./index-Zr2uxkwm.js","./index-DOkRxd0H.css"]
  }
  return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
}
import{d as b,aA as g,i as y,a as B,aC as S,n as h,c as s,o as i,e as M,N as t,b as c,ah as x,ae as k,M as A,_ as C}from"./index-Zr2uxkwm.js";import{u as G}from"./useListResources-BOpsh6R4.js";import{B as L}from"./BuilderApp-BuxvU36r.js";import"./marked.esm-273vDTCT.js";const j={class:"BuilderGraphSelect--text"},E=b({__name:"BuilderGraphSelect",props:g({enableMultiSelection:{type:Boolean,required:!1}},{modelValue:{type:[String,Array],required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(u,{expose:p}){const m=k({loader:()=>A(()=>import("./index-Zr2uxkwm.js").then(e=>e.aW),__vite__mapDeps([0,1]),import.meta.url),loadingComponent:L}),v=y(B.core),a=S(u,"modelValue"),{load:f,data:o,isLoading:r}=G(v,"graphs");h(f);const _=s(()=>o.value.map(e=>({label:e.name,detail:e.description,value:e.id})).sort((e,l)=>e.label.localeCompare(l.label))),d=s({get(){return a.value===void 0?"":typeof a.value=="string"?a.value:a.value.join(",")},set(e){a.value=e.split(",")}}),V=s(()=>{if(a.value!==void 0)return typeof a.value=="string"?o.value.find(e=>e.id===a.value):o.value.filter(e=>a.value.includes(e.id))});return p({selectedData:V}),(e,l)=>(i(),M("div",j,[t(o).length>0||t(r)?(i(),c(t(m),{key:0,modelValue:a.value,"onUpdate:modelValue":l[0]||(l[0]=n=>a.value=n),options:_.value,"hide-icons":"","enable-search":"",loading:t(r),"enable-multi-selection":u.enableMultiSelection},null,8,["modelValue","options","loading","enable-multi-selection"])):(i(),c(x,{key:1,modelValue:d.value,"onUpdate:modelValue":l[1]||(l[1]=n=>d.value=n)},null,8,["modelValue"]))]))}}),P=C(E,[["__scopeId","data-v-61df7d4b"]]);export{P as default};
