import{i as w}from"./metadata-CafHoAN1.js";import{W as x}from"./Watermark-CATW4z83.js";import{P as C}from"./PageStageView-DP6DxLgC.js";import{F as D}from"./PhArrowSquareOut.vue-CSiD2xSC.js";import{L as I}from"./CircularLoading-DQwa5T8S.js";import{e as P,r as u,Y as z,b as H,f as d,j as L,t as s,n as e,y as n,aM as _,l as i,Q as h,R as k,G as V,aN as v,U as F,V as N,H as S,g as a,p as B,aO as T,aq as W}from"./jwt-decode.esm-Bw7_fA5B.js";import{u as j,f as E}from"./workspaceStore-DBRM2rRw.js";import{C as M}from"./index-CgULq8_4.js";import{L as O}from"./LoadingOutlined-CCC-cDSZ.js";import"./PhCursorClick.vue-Cof4LmM6.js";import"./PhHouse.vue-Bnu74Tur.js";import"./PhMagnifyingGlass.vue-BiBwk2K2.js";import"./PhWebhooksLogo.vue-C1merPZ6.js";import"./constants-CRRRdcnD.js";import"./userStore-DLKN1Ius.js";import"./consoleCapture-B2J1w0vQ.js";import"./runnerData-DrbfUeer.js";import"./url-DO-fsxUp.js";import"./colorHelpers-BQVfELzg.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]="a0507b3a-1524-4107-b493-54fc5a26d1b0",r._sentryDebugIdIdentifier="sentry-dbid-a0507b3a-1524-4107-b493-54fc5a26d1b0")}catch{}})();const R={key:0,class:"home-container"},$={key:1,class:"page-wrapper"},q={key:2,class:"home-container"},A=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 y=H(()=>c.state.workspace?.sidebar.filter(t=>t.id!=="home")||[]),p=u(null),b=async(t,g)=>{p.value=g,await l.push({path:`/${t}`}),p.value=null};return(t,g)=>f.value?(a(),d("div",R,[s(I)])):m.value?(a(),d("div",$,[s(C,{"ui-data":m.value},null,8,["ui-data"])])):e(c).state.workspace?(a(),d("div",q,[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),d(F,{key:1},N(y.value,o=>(a(),i(e(M),{key:o.id,class:B(["form-card",{loading:p.value===o.id}]),"body-style":{cursor:"pointer"},onClick:G=>b(o.path,o.id)},{default:n(()=>[s(e(_),{gap:"large",align:"center",justify:"space-between"},{default:n(()=>[(a(),i(T(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),p.value!==o.id?(a(),i(e(D),{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"])])):L("",!0)}}),me=W(A,[["__scopeId","data-v-4eb9c207"]]);export{me as default};
//# sourceMappingURL=Home-DLhG71YC.js.map
