import{i as b}from"./metadata-C1LHj-Qf.js";import{W as x}from"./Watermark-ShqNe1r1.js";import{P as C}from"./PageStageView-Q2JkJBjk.js";import{F as P}from"./PhArrowSquareOut.vue-xDhGWjq7.js";import{L as D}from"./CircularLoading-C_mYUEPg.js";import{e as I,r as u,n as z,b as L,f as p,j as S,x as s,s as e,C as n,aN as _,q as i,S as h,T as k,J as F,aO as v,W as H,X as N,K as T,g as a,t as V,aP as W,ar as B}from"./jwt-decode.esm-rEBc1yJt.js";import{u as j,f as E}from"./workspaceStore-CXj1KaxZ.js";import{C as O}from"./index-D9LKNmUT.js";import{L as $}from"./LoadingOutlined-BWNNCw0T.js";import"./PhWebhooksLogo.vue-ByF-2r3h.js";import"./PhHouse.vue-B8iXucbM.js";import"./PhMagnifyingGlass.vue-Gli9nbfd.js";import"./constants-C-_YHHgQ.js";import"./userStore-DeXNkqIg.js";import"./consoleCapture-B0hRvrGL.js";import"./runnerData-BmXXoqqr.js";import"./url-XyebHjIS.js";import"./colorHelpers-9BGi_4OL.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]="8cad85ae-9f00-40aa-beec-194ac9c2bd08",r._sentryDebugIdIdentifier="sentry-dbid-8cad85ae-9f00-40aa-beec-194ac9c2bd08")}catch{}})();const q={key:0,class:"home-container"},A={key:1,class:"page-wrapper"},J={key:2,class:"home-container"},K=I({__name:"Home",setup(r){const l=T(),c=j(),f=u(!0),m=u(null);z(async()=>{try{const t=await E();t?.type==="page"&&(m.value=t.data)}catch{}finally{f.value=!1}});const y=L(()=>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",q,[s(D)])):m.value?(a(),p("div",A,[s(C,{"ui-data":m.value},null,8,["ui-data"])])):e(c).state.workspace?(a(),p("div",J,[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(F).translate("i18n_home_no_forms_available")),1)]),_:1})):(a(!0),p(H,{key:1},N(y.value,o=>(a(),i(e(O),{key:o.id,class:V(["form-card",{loading:d.value===o.id}]),"body-style":{cursor:"pointer"},onClick:M=>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(P),{key:0,size:"20"})):(a(),i(e($),{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"])])):S("",!0)}}),pe=B(K,[["__scopeId","data-v-4eb9c207"]]);export{pe as default};
//# sourceMappingURL=Home-BVxZ-DGj.js.map
