import{u as I}from"./index.16c6c151.js";import{f as d,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 _,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.91c9f730.js";import{g as H}from"./api.c4c95097.js";import{a as y}from"./asyncComputed.5cff1726.js";import{P as z}from"./PlayerNavbar.ea08c47f.js";import{P as E}from"./repository.4b8f2a92.js";import{e as F}from"./icons.e854b740.js";import{A as G}from"./ArrowRightOutlined.08fa31dd.js";import"./index.6a722ed0.js";import"./index.fc9765ee.js";import{A as v}from"./index.5a63d36f.js";import{T as h}from"./Typography.c7c5698a.js";import{C as L}from"./Card.a8631760.js";import"./pubsub.25829540.js";import"./runnerData.08a2f6cc.js";import"./url.bd840ee9.js";import"./Base.79932679.js";import"./Link.dd2279d6.js";import"./Paragraph.18e7082b.js";import"./Text.2f03529d.js";import"./Title.69e80303.js";import"./TabPane.7a826f8d.js";import"./hasIn.d8588324.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]="2da043d7-ea64-4dbd-9688-22ccb24bda48",a._sentryDebugIdIdentifier="sentry-dbid-2da043d7-ea64-4dbd-9688-22ccb24bda48")}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 b=function(e,t){var r=k({},e,t.attrs);return d(D,k({},r,{icon:G}),null)};b.displayName="ArrowRightOutlined";b.inheritAttrs=!1;const W=b,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 "),d(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(u=>u.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 u;return o(),_("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:(u=n(t))==null?void 0:u.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),_(V,null,N(s.value,m=>(o(),l(n(L),{key:m.id,class:"form-card",onClick:Y=>O(m.path)},{default:c(()=>[d(n(v),{gap:"large",align:"center",justify:"space-between"},{default:c(()=>[d(n(h),{style:{"font-size":"18px","font-weight":"500"}},{default:c(()=>[f(j(m.name),1)]),_:2},1024),d($,{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.d61d1893.js.map
