import{u as I}from"./index.7dcd1439.js";import{f as u,eG as D,d as w,b as o,c as l,w as c,ar as f,u as n,bG as P,v as x,eA as R,H as B,ev as b,ex as g,e as K,ew as S,bg as T,aD as V,eC as N,eD as j,I as $}from"./outputWidgets.9bb29762.js";import{g as H}from"./api.8bd36db0.js";import{a as y}from"./asyncComputed.ac1a0197.js";import{P as z}from"./PlayerNavbar.9b695a29.js";import{P as E}from"./repository.2c4dc05e.js";import{e as F}from"./icons.d08bf04b.js";import{A as G}from"./ArrowRightOutlined.08fa31dd.js";import"./index.e7d326b6.js";import"./index.f6df0175.js";import{A as v}from"./index.fcc99b17.js";import{T as h}from"./Typography.184e8c0b.js";import{C as L}from"./Card.b91f4cc4.js";import"./pubsub.90d4935e.js";import"./runnerData.84b552ce.js";import"./url.c222fac4.js";import"./Base.abff5e35.js";import"./Link.f9998948.js";import"./Paragraph.9dbf4710.js";import"./Text.5324981a.js";import"./Title.b342fcc9.js";import"./TabPane.aa230872.js";import"./hasIn.fa8167cd.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="17fa7058-2d34-4e0a-915b-fddd24c63247",a._sentryDebugIdIdentifier="sentry-dbid-17fa7058-2d34-4e0a-915b-fddd24c63247")}catch{}})();function k(a){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?Object(arguments[e]):{},r=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(t).filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable}))),r.forEach(function(s){M(a,s,t[s])})}return a}function M(a,e,t){return e in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}var _=function(e,t){var r=k({},e,t.attrs);return u(D,k({},r,{icon:G}),null)};_.displayName="ArrowRightOutlined";_.inheritAttrs=!1;const W=_,q=w({__name:"KanbanButton",emits:["go-to-kanban"],setup(a,{emit:e}){return(t,r)=>(o(),l(n(P),{class:"kanban-btn",onClick:r[0]||(r[0]=s=>e("go-to-kanban"))},{default:c(()=>[f(" Kanban "),u(n(W))]),_:1}))}});const J=x(q,[["__scopeId","data-v-73dd2178"]]),Q={class:"page"},U=w({__name:"Home",setup(a){const e=R(),{result:t,loading:r}=y(H),s=B(()=>{var i,p;return(p=(i=t.value)==null?void 0:i.sidebar.filter(d=>d.visible))!=null?p:[]}),O=i=>{e.push({path:`/${i}`})},A=()=>{e.push({name:"playerKanban"})},C=y(async()=>{try{return await new E(I).getData({selection:[]}),!0}catch{return!1}});return(i,p)=>{var d;return o(),b("div",Q,[n(t)?(o(),l(z,{key:0,"runner-data":n(t),"hide-sidebar":""},null,8,["runner-data"])):g("",!0),K("div",{class:"container",style:S({backgroundColor:(d=n(t))==null?void 0:d.theme})},[n(r)?(o(),l(n(T),{key:0})):s.value.length===0?(o(),l(n(h),{key:1,type:"secondary",style:{"font-size":"18px"}},{default:c(()=>[f(" There are no public forms available ")]),_:1})):(o(),l(n(v),{key:2,vertical:"",gap:"large",style:{padding:"120px 0"}},{default:c(()=>[(o(!0),b(V,null,N(s.value,m=>(o(),l(n(L),{key:m.id,class:"form-card",onClick:Y=>O(m.path)},{default:c(()=>[u(n(v),{gap:"large",align:"center",justify:"space-between"},{default:c(()=>[u(n(h),{style:{"font-size":"18px","font-weight":"500"}},{default:c(()=>[f(j(m.name),1)]),_:2},1024),u($,{path:n(F),fill:"#000",width:"20"},null,8,["path"])]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})),n(C)?(o(),l(J,{key:3,onGoToKanban:A})):g("",!0)],4)])}}});const we=x(U,[["__scopeId","data-v-68d92933"]]);export{we as default};
//# sourceMappingURL=Home.6b68bd0b.js.map
