import"./navigation-BzNQiq4W.js";import{z as b,a6 as v,a2 as g,au as V,g as x}from"./ReferenceContentLoader-Z8YmHBVJ.js";import{b as h}from"./ViewLayoutSection.vue-BXfzZm28.js";import{d as _,V as B,b as s,o,K as c,g as t,i as p,j as F,t as m,h as n,k as w,l as a,F as z,x as C,y as N,n as u}from"./index-DPl1iiyq.js";const U={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=_({__name:"Form",props:{title:{},options:{},data:{},onUpdate:{type:Function}},setup(D){const{activeEnvVariables:k,activeEnvironment:f,activeWorkspace:r}=b(),i=B();return(e,I)=>(o(),s(h,{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(z,null,C(e.options,(l,d)=>(o(),s(g,{key:d,class:N({"border-t":d===0})},{default:t(()=>[u(V,{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":y=>e.onUpdate(l.key,y)},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})):w("",!0)])]),_:2},[e.title||e.$slots.title?{name:"title",fn:t(()=>[e.title?(o(),p("span",U,m(e.title),1)):F(e.$slots,"title",{key:1})]),key:"0"}:void 0]),1024))}});export{M as q};
