import{i as w}from"./metadata-BChRtKe-.js";import{W as x}from"./Watermark-Dg0LFP37.js";import{P as C}from"./PageStageView-_Cx8Y7jn.js";import{F as P}from"./PhArrowSquareOut.vue-CYj5cBpx.js";import{L as D}from"./CircularLoading-ZA74WI6Y.js";import{e as I,r as u,Z as z,b as H,f as p,j as L,p as s,n as e,w as n,aN as _,l as i,R as h,S as k,H as S,aO as v,V,W as F,J as N,g as a,t as W,aP as B,ar as T}from"./jwt-decode.esm-BPi7UGps.js";import{u as j,f as E}from"./workspaceStore-C0F9gl0n.js";import{C as O}from"./index-X5taQPAx.js";import{L as R}from"./LoadingOutlined-DXQ6kgSY.js";import"./PhCursorClick.vue-DJnlpzw_.js";import"./PhHouse.vue-Hr4UgoFg.js";import"./PhMagnifyingGlass.vue-C5-WYoZW.js";import"./PhWebhooksLogo.vue-iVW9tShz.js";import"./constants-BsVzWrXw.js";import"./userStore-DX_yqXyz.js";import"./consoleCapture-B_VXYVZg.js";import"./runnerData-CVdM876v.js";import"./url-pqXfY2Q9.js";import"./colorHelpers-2--HXixt.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]="1f2bae2d-0668-4dd8-9e75-09d436248bb5",r._sentryDebugIdIdentifier="sentry-dbid-1f2bae2d-0668-4dd8-9e75-09d436248bb5")}catch{}})();const $={key:0,class:"home-container"},A={key:1,class:"page-wrapper"},J={key:2,class:"home-container"},M=I({__name:"Home",setup(r){const l=N(),d=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=H(()=>d.state.workspace?.sidebar.filter(t=>t.id!=="home")||[]),c=u(null),b=async(t,g)=>{c.value=g,await l.push({path:`/${t}`}),c.value=null};return(t,g)=>f.value?(a(),p("div",$,[s(D)])):m.value?(a(),p("div",A,[s(C,{"ui-data":m.value},null,8,["ui-data"])])):e(d).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(S).translate("i18n_home_no_forms_available")),1)]),_:1})):(a(!0),p(V,{key:1},F(y.value,o=>(a(),i(e(O),{key:o.id,class:W(["form-card",{loading:c.value===o.id}]),"body-style":{cursor:"pointer"},onClick:Z=>b(o.path,o.id)},{default:n(()=>[s(e(_),{gap:"large",align:"center",justify:"space-between"},{default:n(()=>[(a(),i(B(e(w)(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),c.value!==o.id?(a(),i(e(P),{key:0,size:"20"})):(a(),i(e(R),{key:1,style:{"font-size":"20px"}}))]),_:2},1024)]),_:2},1032,["class","onClick"]))),128))]),_:1}),s(x,{class:"watermark","page-id":"home",locale:e(d).state.workspace.language},null,8,["locale"])])):L("",!0)}}),me=T(M,[["__scopeId","data-v-4eb9c207"]]);export{me as default};
//# sourceMappingURL=Home-ohhaxapo.js.map
