import{i as b}from"./metadata-D505evBf.js";import{W as x}from"./Watermark-DfAB5ULw.js";import{P as C}from"./PageStageView-BOFXhF2K.js";import{F as P}from"./PhArrowSquareOut.vue-U7CFLNmf.js";import{L as D}from"./CircularLoading-223w4e_R.js";import{e as I,r as u,$ as z,b as L,f as p,j as S,q as s,p as e,w as n,aN as _,n as i,R as h,S as k,l as F,aO as v,W as H,X as N,J as V,g as a,x as W,aP as B,ar as T}from"./jwt-decode.esm-01iVuizL.js";import{u as $,f as j}from"./workspaceStore-BhaNP0o0.js";import{C as E}from"./index-C2tJegwt.js";import{L as O}from"./LoadingOutlined-CrTvjdoo.js";import"./PhCursorClick.vue-BoGuSmin.js";import"./PhHouse.vue-D9SyQW53.js";import"./PhMagnifyingGlass.vue-CKu85Jsu.js";import"./PhWebhooksLogo.vue-CaqvpPuk.js";import"./constants-CoO3uBL8.js";import"./userStore-iHeQ9myT.js";import"./consoleCapture-CTAnNYCQ.js";import"./runnerData-DQQoihab.js";import"./url-BSbu8oDe.js";import"./colorHelpers-CwNCbXrN.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]="29f7ecde-7785-40b4-a426-da5c5aeddfb3",r._sentryDebugIdIdentifier="sentry-dbid-29f7ecde-7785-40b4-a426-da5c5aeddfb3")}catch{}})();const R={key:0,class:"home-container"},q={key:1,class:"page-wrapper"},A={key:2,class:"home-container"},J=I({__name:"Home",setup(r){const l=V(),c=$(),f=u(!0),m=u(null);z(async()=>{try{const t=await j();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",R,[s(D)])):m.value?(a(),p("div",q,[s(C,{"ui-data":m.value},null,8,["ui-data"])])):e(c).state.workspace?(a(),p("div",A,[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(E),{key:o.id,class:W(["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(B(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(O),{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)}}),me=T(J,[["__scopeId","data-v-4eb9c207"]]);export{me as default};
//# sourceMappingURL=Home-C763jXsS.js.map
