import{i as b}from"./metadata-nvVJcWCT.js";import{W as x}from"./Watermark-znl7zoYd.js";import{P as C}from"./PageStageView-BOmQmcX5.js";import{F as D}from"./PhArrowSquareOut.vue-DUgxW_Qb.js";import{L as I}from"./CircularLoading-D6n2bEFF.js";import{e as P,r as u,Q as z,b as H,f as d,j as L,v as s,p as e,w as n,C as _,n as i,q as h,t as k,l as V,b6 as v,K as F,X as N,ag as S,g as a,H as B,V as T,aN as W}from"./jwt-decode.esm-Di13oRQw.js";import{u as j,f as E}from"./workspaceStore-D9mz6FOR.js";import{C as $}from"./index-BhmvSrs-.js";import{L as q}from"./LoadingOutlined-CwvBrzZA.js";import"./PhCursorClick.vue-C3W_0Auv.js";import"./PhHouse.vue-Ya80KDgR.js";import"./PhMagnifyingGlass.vue-Drv7e4a5.js";import"./PhWebhooksLogo.vue-BFXMvocO.js";import"./constants-D5_IKi1U.js";import"./userStore-DtRefrCQ.js";import"./consoleCapture-0m24QrWJ.js";import"./runnerData-PSt4Y1Um.js";import"./url-BV-AFuGX.js";import"./colorHelpers-Bkim6eSt.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]="04f37bdd-6c73-4f99-8e1e-865089c40769",r._sentryDebugIdIdentifier="sentry-dbid-04f37bdd-6c73-4f99-8e1e-865089c40769")}catch{}})();const A={key:0,class:"home-container"},K={key:1,class:"page-wrapper"},M={key:2,class:"home-container"},O=P({__name:"Home",setup(r){const l=S(),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 g=H(()=>c.state.workspace?.sidebar.filter(t=>t.id!=="home")||[]),p=u(null),w=async(t,y)=>{p.value=y,await l.push({path:`/${t}`}),p.value=null};return(t,y)=>f.value?(a(),d("div",A,[s(I)])):m.value?(a(),d("div",K,[s(C,{"ui-data":m.value},null,8,["ui-data"])])):e(c).state.workspace?(a(),d("div",M,[s(e(_),{vertical:"",gap:"large",class:"cards-container"},{default:n(()=>[g.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),d(F,{key:1},N(g.value,o=>(a(),i(e($),{key:o.id,class:B(["form-card",{loading:p.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(T(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),p.value!==o.id?(a(),i(e(D),{key:0,size:"20"})):(a(),i(e(q),{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=W(O,[["__scopeId","data-v-4eb9c207"]]);export{me as default};
//# sourceMappingURL=Home-gdr5bj6I.js.map
