import{F as y,a6 as b,a3 as V,aD as g,q as x}from"./ReferenceContentLoader-jQeEHBuo.js";import"./navigation-BK47qCFk.js";import{_ as F}from"./ViewLayoutSection.vue-Cvh5w_-L.js";import{d as _,a2 as h,y as s,o as l,z as c,A as t,c as p,r as w,t as m,b as n,a as z,u as a,F as B,l as C,p as N,f as u}from"./index-D86EVCbM.js";const U={key:0},D={class:"custom-scroll flex flex-1 flex-col gap-1.5"},E=["for"],S={class:"bg-b-2 flex-center border-l px-2"},O=_({__name:"Form",props:{title:{},options:{},data:{},onUpdate:{type:Function}},setup(q){const{activeEnvVariables:f,activeEnvironment:k,activeWorkspace:r}=y(),i=h();return(e,I)=>(l(),s(F,null,c({default:t(()=>[n("div",D,[Object.keys(e.data).length>0&&a(r)?(l(),s(b,{key:0,columns:[""]},{default:t(()=>[(l(!0),p(B,null,C(e.options,(o,d)=>(l(),s(V,{key:d,class:N({"border-t":d===0})},{default:t(()=>[u(g,{id:a(i),envVariables:a(f),environment:a(k),modelValue:e.data[o.key]??"",placeholder:o.placeholder,workspace:a(r),"onUpdate:modelValue":v=>e.onUpdate(o.key,v)},c({default:t(()=>[n("label",{for:a(i)},m(o.label),9,E)]),_:2},[o.key==="description"?{name:"icon",fn:t(()=>[n("div",S,[u(a(x),{icon:"Markdown",size:"lg"})])]),key:"0"}:void 0]),1032,["id","envVariables","environment","modelValue","placeholder","workspace","onUpdate:modelValue"])]),_:2},1032,["class"]))),128))]),_:1})):z("",!0)])]),_:2},[e.title||e.$slots.title?{name:"title",fn:t(()=>[e.title?(l(),p("span",U,m(e.title),1)):w(e.$slots,"title",{key:1})]),key:"0"}:void 0]),1024))}});export{O as q};
