import{i as w}from"./metadata-CfEi-IxO.js";import{W as x}from"./Watermark-Bs4QVH0Z.js";import{P as C}from"./PageStageView-Bjm-ro9c.js";import{F as P}from"./PhArrowSquareOut.vue-CWrW2Tze.js";import{L as D}from"./CircularLoading-D6CW-lVm.js";import{e as I,r as u,$ as z,b as L,f as d,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 b,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-CZajAnkk.js";import{u as $,f as j}from"./workspaceStore-B2G7PrH8.js";import{C as E}from"./index-Dl2ekNlA.js";import{L as O}from"./LoadingOutlined-C3cOtTgj.js";import"./PhCursorClick.vue-CBE2laQW.js";import"./PhHouse.vue-DkBF1kve.js";import"./PhMagnifyingGlass.vue-CIDyhW5D.js";import"./PhWebhooksLogo.vue-nty9ly2q.js";import"./constants-DBenAw06.js";import"./userStore-BD2sJQ0n.js";import"./consoleCapture-DxHXlId9.js";import"./runnerData-BvOYrde2.js";import"./url-CT13c0nd.js";import"./colorHelpers-C087BzGB.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]="1849b33d-cbb8-48aa-bfe0-e22fd8a72494",r._sentryDebugIdIdentifier="sentry-dbid-1849b33d-cbb8-48aa-bfe0-e22fd8a72494")}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")||[]),p=u(null),v=async(t,g)=>{p.value=g,await l.push({path:`/${t}`}),p.value=null};return(t,g)=>f.value?(a(),d("div",R,[s(D)])):m.value?(a(),d("div",q,[s(C,{"ui-data":m.value},null,8,["ui-data"])])):e(c).state.workspace?(a(),d("div",A,[s(e(_),{vertical:"",gap:"large",class:"cards-container"},{default:n(()=>[y.value.length===0?(a(),i(e(b),{key:0,type:"secondary",style:{"font-size":"18px"}},{default:n(()=>[h(k(e(F).translate("i18n_home_no_forms_available")),1)]),_:1})):(a(!0),d(H,{key:1},N(y.value,o=>(a(),i(e(E),{key:o.id,class:W(["form-card",{loading:p.value===o.id}]),"body-style":{cursor:"pointer"},onClick:M=>v(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(b),{style:{"font-size":"18px","font-weight":"500"}},{default:n(()=>[h(k(o.name),1)]),_:2},1024),p.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-DFrj2r5d.js.map
