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