import{d as y,aC as v,b as s,o,a0 as c,h as t,j as p,k as V,t as m,i as n,n as g,p as a,F as h,I as x,C as _,q as k,bU as C}from"./index-BX34W763.js";import{V as B,a0 as F,Y as U,ar as w}from"./ReferenceContentLoader-D7Cnl9bC.js";import{b as N}from"./ViewLayoutSection.vue-jyo-hhqX.js";const z={key:0},E={class:"flex flex-1 flex-col gap-1.5"},I=["for"],S={class:"centered-y bg-b-2 flex-center absolute right-1 z-1 rounded px-1 py-0.5"},M=y({__name:"Form",props:{title:{},options:{},data:{},onUpdate:{type:Function}},setup(j){const{activeEnvVariables:u,activeEnvironment:f,activeWorkspace:r}=B(),i=v();return(e,q)=>(o(),s(N,{class:"last:rounded-b-lg"},c({default:t(()=>[n("div",E,[Object.keys(e.data).length>0&&a(r)?(o(),s(F,{key:0,columns:[""],class:"rounded-b-lg"},{default:t(()=>[(o(!0),p(h,null,x(e.options,(l,d)=>(o(),s(U,{key:d,class:_({"border-t":d===0})},{default:t(()=>[k(w,{class:"pr-9",lineWrapping:"",id:a(i),envVariables:a(u),environment:a(f),modelValue:e.data[l.key]??"",placeholder:l.placeholder,workspace:a(r),"onUpdate:modelValue":b=>e.onUpdate(l.key,b)},c({default:t(()=>[n("label",{for:a(i)},m(l.label),9,I)]),_:2},[l.key==="description"?{name:"icon",fn:t(()=>[n("div",S,[k(a(C),{icon:"Markdown",size:"lg"})])]),key:"0"}:void 0]),1032,["id","envVariables","environment","modelValue","placeholder","workspace","onUpdate:modelValue"])]),_:2},1032,["class"]))),128))]),_:1})):g("",!0)])]),_:2},[e.title||e.$slots.title?{name:"title",fn:t(()=>[e.title?(o(),p("span",z,m(e.title),1)):V(e.$slots,"title",{key:1})]),key:"0"}:void 0]),1024))}});export{M as q};
