import{i as b}from"./metadata-DrICDQBk.js";import{W as x}from"./Watermark-CCh_fY7p.js";import{P as C}from"./PageStageView-rF7lRQUt.js";import{F as D}from"./PhArrowSquareOut.vue-Dpq0hs_m.js";import{L as I}from"./CircularLoading-B5VLBjSJ.js";import{e as P,r as u,R as z,b as L,f as d,j as F,v as s,p as e,w as n,D as _,n as i,q as h,t as k,l as H,b7 as v,M as S,Y as V,ah as W,g as a,I as B,W as N,aO as T}from"./jwt-decode.esm-Da8x-1xB.js";import{u as j,f as E}from"./workspaceStore-sWJCG1kE.js";import{C as M}from"./index-BK7IKiwl.js";import{L as O}from"./LoadingOutlined-BkOwXhRU.js";import"./PhCursorClick.vue-CXFAK_Y9.js";import"./PhHouse.vue-tkMOCcnC.js";import"./PhMagnifyingGlass.vue-C4J75yyG.js";import"./PhWebhooksLogo.vue-kd7Zejxh.js";import"./constants-CAYghYvd.js";import"./userStore-B4jqUwEL.js";import"./consoleCapture-DREw56G-.js";import"./runnerData-Ck30Znt6.js";import"./url-WpgygH3Q.js";import"./colorHelpers-DWgwf-SH.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]="4018f904-875e-467e-bd7c-3c8ae15d691b",r._sentryDebugIdIdentifier="sentry-dbid-4018f904-875e-467e-bd7c-3c8ae15d691b")}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=W(),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=L(()=>c.state.workspace?.sidebar.filter(t=>t.id!=="home")||[]),p=u(null),w=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(H).translate("i18n_home_no_forms_available")),1)]),_:1})):(a(!0),d(S,{key:1},V(y.value,o=>(a(),i(e(M),{key:o.id,class:B(["form-card",{loading:p.value===o.id}]),"body-style":{cursor:"pointer"},onClick:Y=>w(o.path,o.id)},{default:n(()=>[s(e(_),{gap:"large",align:"center",justify:"space-between"},{default:n(()=>[(a(),i(N(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(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"])])):F("",!0)}}),me=T(A,[["__scopeId","data-v-4eb9c207"]]);export{me as default};
//# sourceMappingURL=Home-Cpo05ZYB.js.map
