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 V,ay as b,i as B,a as h,az as S,m as k,c as r,o as s,e as x,M as o,b as c,ae as A,ab as M,L as C,_ as L}from"./index-ChhimAZ-.js";import{u as j}from"./useListResources-GOaOUbdv.js";import{B as w}from"./BuilderApp-CNfRViSf.js";import"./BaseTransitionSlideFade-Cz5sXvu2.js";import"./marked.esm-273vDTCT.js";const T={class:"BuilderGraphSelect--text"},E=V({__name:"BuilderApplicationSelect",props:b({enableMultiSelection:{type:Boolean,required:!1}},{modelValue:{type:[String,Array],required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(i,{expose:p}){const m=M({loader:()=>C(()=>import("./BuilderSelect-DdIdCGqL.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url),loadingComponent:w}),v=B(h.core),a=S(i,"modelValue"),{load:f,data:l,isLoading:u}=j(v,"applications");k(f);function g(e){switch(e.type){case"chat":return"Chat app";case"framework":return"Framework";case"generation":return"Text generation";case"research":return"Research assistant"}}const _=r(()=>l.value.map(e=>({label:e.name,value:e.id,detail:[g(e),e.status].join(" · ")})).sort((e,t)=>e.label.localeCompare(t.label))),d=r({get(){return a.value===void 0?"":typeof a.value=="string"?a.value:a.value.join(",")},set(e){a.value=e.split(",")}}),y=r(()=>{if(a.value!==void 0)return typeof a.value=="string"?l.value.find(e=>e.id===a.value):l.value.filter(e=>a.value.includes(e.id))});return p({selectedData:y}),(e,t)=>(s(),x("div",T,[o(l).length>0||o(u)?(s(),c(o(m),{key:0,modelValue:a.value,"onUpdate:modelValue":t[0]||(t[0]=n=>a.value=n),options:_.value,"hide-icons":"","enable-search":"",loading:o(u),"enable-multi-selection":i.enableMultiSelection},null,8,["modelValue","options","loading","enable-multi-selection"])):(s(),c(A,{key:1,modelValue:d.value,"onUpdate:modelValue":t[1]||(t[1]=n=>d.value=n)},null,8,["modelValue"]))]))}}),P=L(E,[["__scopeId","data-v-dec5650f"]]);export{P as default};
