import{i as b}from"./metadata-BIa60fQy.js";import{W as x}from"./Watermark-BVtezSQa.js";import{P as C}from"./PageStageView-xhTSzzwr.js";import{F as D}from"./PhArrowSquareOut.vue-DSYyVG4D.js";import{L as I}from"./CircularLoading-BM6NYRgA.js";import{e as P,r as u,Z as z,b as H,f as p,j as L,w as s,p as e,B as n,aM as _,n as i,Q as h,R as k,l as V,aN as v,V as B,W as F,H as N,g as a,q as S,aO as W,aq as T}from"./jwt-decode.esm-cMnpfgdw.js";import{u as j,f as q}from"./workspaceStore-B9WQPxPo.js";import{C as E}from"./index-BJSUMwQL.js";import{L as M}from"./LoadingOutlined-BD61iDZs.js";import"./PhCursorClick.vue-1NPnW691.js";import"./PhHouse.vue-_iDofQZr.js";import"./PhMagnifyingGlass.vue-DNS7_t1H.js";import"./PhWebhooksLogo.vue-B0HpNhEk.js";import"./constants-2HINPs8G.js";import"./userStore-DbIwjNKy.js";import"./consoleCapture-CqJAVhTe.js";import"./runnerData-B02TUtQ4.js";import"./url-vqNrw1OC.js";import"./colorHelpers-CPrTu2hh.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},l=new Error().stack;l&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[l]="5d830cfa-c446-4a59-b3d1-ba6d14615490",r._sentryDebugIdIdentifier="sentry-dbid-5d830cfa-c446-4a59-b3d1-ba6d14615490")}catch{}})();const O={key:0,class:"home-container"},R={key:1,class:"page-wrapper"},$={key:2,class:"home-container"},A=P({__name:"Home",setup(r){const l=N(),c=j(),f=u(!0),m=u(null);z(async()=>{try{const t=await q();t?.type==="page"&&(m.value=t.data)}catch{}finally{f.value=!1}});const y=H(()=>c.state.workspace?.sidebar.filter(t=>t.id!=="home")||[]),d=u(null),w=async(t,g)=>{d.value=g,await l.push({path:`/${t}`}),d.value=null};return(t,g)=>f.value?(a(),p("div",O,[s(I)])):m.value?(a(),p("div",R,[s(C,{"ui-data":m.value},null,8,["ui-data"])])):e(c).state.workspace?(a(),p("div",$,[s(e(_),{vertical:"",gap:"large",class:"cards-container"},{default:n(()=>[y.value.length===0?(a(),i(e(v),{key:0,type:"secondary",style:{"font-size":"18px"}},{default:n(()=>[h(k(e(V).translate("i18n_home_no_forms_available")),1)]),_:1})):(a(!0),p(B,{key:1},F(y.value,o=>(a(),i(e(E),{key:o.id,class:S(["form-card",{loading:d.value===o.id}]),"body-style":{cursor:"pointer"},onClick:Q=>w(o.path,o.id)},{default:n(()=>[s(e(_),{gap:"large",align:"center",justify:"space-between"},{default:n(()=>[(a(),i(W(e(b)(o.type)),{style:{"flex-shrink":"0",width:"22px",height:"18px"}})),s(e(v),{style:{"font-size":"18px","font-weight":"500"}},{default:n(()=>[h(k(o.name),1)]),_:2},1024),d.value!==o.id?(a(),i(e(D),{key:0,size:"20"})):(a(),i(e(M),{key:1,style:{"font-size":"20px"}}))]),_:2},1024)]),_:2},1032,["class","onClick"]))),128))]),_:1}),s(x,{class:"watermark","page-id":"home",locale:e(c).state.workspace.language},null,8,["locale"])])):L("",!0)}}),me=T(A,[["__scopeId","data-v-4eb9c207"]]);export{me as default};
//# sourceMappingURL=Home-kUiwLFrA.js.map
