import{u as C}from"./index.4f7b2ab2.js";import{f as m,eG as N,d as S,H as w,b as r,ev as l,e as u,aD as R,eC as P,ez as f,eD as v,v as O,G as A,eA as $,u as b,ex as d,I as B,c as D,w as E,eE as V,eF as j,ar as U,bG as G}from"./outputWidgets.f0391a74.js";import{u as K,x as z}from"./icons.f7511453.js";import{P as F}from"./repository.b2311d69.js";import{a as T}from"./asyncComputed.363f961e.js";import{A as H}from"./ArrowRightOutlined.08fa31dd.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new Error().stack;n&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[n]="68b17650-f596-47be-9bb2-493a2729ce39",a._sentryDebugIdIdentifier="sentry-dbid-68b17650-f596-47be-9bb2-493a2729ce39")}catch{}})();function k(a){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?Object(arguments[n]):{},s=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(s=s.concat(Object.getOwnPropertySymbols(t).filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable}))),s.forEach(function(i){L(a,i,t[i])})}return a}function L(a,n,t){return n in a?Object.defineProperty(a,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[n]=t,a}var _=function(n,t){var s=k({},n,t.attrs);return m(N,k({},s,{icon:H}),null)};_.displayName="ArrowRightOutlined";_.inheritAttrs=!1;const M=_,q={class:"sidebar-content"},J={class:"section"},Q=["onClick"],W={class:"item-title"},X=S({__name:"Sidebar",props:{runnerData:{},displaySidebar:{type:Boolean},forceResponsivity:{}},emits:["selectRuntime","closeSidebar"],setup(a,{emit:n}){const t=a,s=o=>{y(o.id)||n("selectRuntime",o)},i=w(()=>t.runnerData.sidebar.filter(o=>o.visible)),y=o=>"id"in t.runnerData?t.runnerData.id===o:!1;return(o,g)=>(r(),l("div",{class:f(["sidebar",o.forceResponsivity,{open:o.displaySidebar}])},[u("div",q,[u("div",J,[(r(!0),l(R,null,P(i.value,c=>(r(),l("div",{key:c.id,class:f(["item",{active:y(c.id)}]),onClick:h=>s(c)},[u("div",W,v(c.name),1)],10,Q))),128))])])],2))}});const Y=O(X,[["__scopeId","data-v-574075ab"]]),Z=a=>(V("data-v-659a1ae9"),a=a(),j(),a),x={class:"left-side"},ee=["d"],ae={key:1,class:"brand"},ne=["src"],te={key:1,class:"brand-name"},re=Z(()=>u("div",null,null,-1)),se={key:0,class:"signed-email"},ie=S({__name:"PlayerNavbar",props:{runnerData:{},userEmail:{},forceResponsivity:{},hideSidebar:{type:Boolean}},emits:["logout","navigate"],setup(a,{emit:n}){const t=a,s=A({displaySidebar:!1}),i=w(()=>{const e=t.runnerData.sidebar;return!e||e.length==0||t.hideSidebar?!1:e.some(p=>p.visible)}),o=T(async()=>{try{return await new F(C).getData({selection:[]}),!0}catch{return!1}}),g=$(),c=()=>{g.push({name:"playerKanban"})},h=e=>n("navigate",e);return(e,p)=>(r(),l(R,null,[i.value||e.runnerData.logoUrl||e.runnerData.brandName||e.userEmail?(r(),l("div",{key:0,class:f(["navbar",i.value&&"background"])},[u("div",x,[i.value?(r(),l("svg",{key:0,class:f(["sidebar-menu-icon",e.forceResponsivity]),viewBox:"0 0 24 24",fill:"var(--color-main)",onClick:p[0]||(p[0]=I=>s.displaySidebar=!s.displaySidebar)},[u("path",{d:b(K)},null,8,ee)],2)):d("",!0),e.runnerData.logoUrl||e.runnerData.brandName?(r(),l("div",ae,[e.runnerData.logoUrl?(r(),l("img",{key:0,src:e.runnerData.logoUrl,class:"logo-image"},null,8,ne)):d("",!0),e.runnerData.brandName?(r(),l("p",te,v(e.runnerData.brandName),1)):d("",!0)])):d("",!0)]),re,e.userEmail?(r(),l("div",se,[u("span",null,v(e.userEmail),1),m(B,{width:"20",height:"20",class:"logout",path:b(z),fill:"var(--color-main)",onClick:p[1]||(p[1]=I=>n("logout"))},null,8,["path"])])):d("",!0),b(o)?(r(),D(b(G),{key:1,type:"link",onClick:c},{default:E(()=>[U(" Kanban "),m(b(M))]),_:1})):d("",!0)],2)):d("",!0),i.value?(r(),D(Y,{key:1,"runner-data":e.runnerData,"display-sidebar":s.displaySidebar,"force-responsivity":e.forceResponsivity,onSelectRuntime:h},null,8,["runner-data","display-sidebar","force-responsivity"])):d("",!0)],64))}});const be=O(ie,[["__scopeId","data-v-659a1ae9"]]);export{be as P};
//# sourceMappingURL=PlayerNavbar.23eb39a3.js.map
