import{M as w,b9 as D,d as B,S as N,N as U,O as V,w as W,e as i,h as e,E as S,F as h,P as p,U as q,q as z,i as b,G as E,t as C,k as g,ba as j,o as t,f as L,g as H,bb as F,bc as G,u as $,ak as T,aW as K,an as X,_ as O,a as J,bd as Q,j as n,be as P,b8 as Y,ae as Z,bf as ee}from"./index-D92x6h1h.js";import{R as ae}from"./radio-tower-CpGu9kPC.js";import{B as te}from"./bug-CknZEDL-.js";/**
 * @license lucide-vue-next v0.460.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const se=w("CastIcon",[["path",{d:"M2 8V6a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-6",key:"3zrzxg"}],["path",{d:"M2 12a9 9 0 0 1 8 8",key:"g6cvee"}],["path",{d:"M2 16a5 5 0 0 1 4 4",key:"1y1dii"}],["line",{x1:"2",x2:"2.01",y1:"20",y2:"20",key:"xu2jvo"}]]);/**
 * @license lucide-vue-next v0.460.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const oe=w("KeyIcon",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);/**
 * @license lucide-vue-next v0.460.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ne=w("UsersIcon",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]),ie=D("tvh-l2sidebar:state"),le=["aria-label"],re={key:0,class:"l2-sidebar__l1-icon","aria-hidden":"true"},ce=["aria-label","value"],ue=["value"],de={class:"l2-sidebar__list"},be={class:"l2-sidebar__label"},ve=["title","aria-label","aria-expanded"],_e={class:"l2-sidebar__toggle-label"},he=1280,pe=B({__name:"L2Sidebar",props:{tabs:{},ariaLabel:{},l1Icon:{type:[Function,Object]}},setup(l){const o=$(),v=l,d=K(),f=X(),r=g(()=>{const c=v.tabs.filter(s=>d.path===s.to||d.path.startsWith(s.to+"/"));return c.sort((s,m)=>m.to.length-s.to.length),c[0]?.to??v.tabs[0]?.to??""}),_=N(),{manualCollapsed:y,autoActive:x,autoOverride:I,toggle:M,clearAutoOverride:R}=ie(),u=g(()=>_.value?!1:I.value!==null?I.value:y.value||x.value);function k(){const c=globalThis.window.innerWidth;x.value=c>=j&&c<he}U(()=>{globalThis.window.addEventListener("resize",k),k()}),V(()=>globalThis.window.removeEventListener("resize",k)),W(()=>d.path,()=>R());function A(c){const s=c.target;s.value&&s.value!==d.path&&f.push(s.value)}return(c,s)=>{const m=T("router-link");return t(),i("nav",{class:S(["l2-sidebar",{"l2-sidebar--phone":e(_),"l2-sidebar--collapsed":u.value}]),"aria-label":l.ariaLabel??e(o).t("Section navigation")},[e(_)?(t(),i(h,{key:0},[l.l1Icon?(t(),i("span",re,[(t(),p(q(l.l1Icon),{size:20,"stroke-width":2}))])):z("",!0),b("select",{class:"l2-sidebar__select","aria-label":l.ariaLabel??e(o).t("Section navigation"),value:r.value,onChange:A},[(t(!0),i(h,null,E(l.tabs,a=>(t(),i("option",{key:a.to,value:a.to},C(a.label),9,ue))),128))],40,ce)],64)):(t(),i(h,{key:1},[b("ul",de,[(t(!0),i(h,null,E(l.tabs,a=>(t(),i("li",{key:a.to},[L(m,{to:a.to,class:S(["l2-sidebar__item",{"l2-sidebar__item--active":r.value===a.to}]),title:u.value?a.label:void 0},{default:H(()=>[a.icon?(t(),p(q(a.icon),{key:0,size:18,"stroke-width":2,class:"l2-sidebar__icon"})):z("",!0),b("span",be,C(a.label),1)]),_:2},1032,["to","class","title"])]))),128))]),b("button",{type:"button",class:"l2-sidebar__toggle",title:u.value?e(o).t("Expand"):e(o).t("Collapse"),"aria-label":u.value?e(o).t("Expand sidebar"):e(o).t("Collapse sidebar"),"aria-expanded":!u.value,onClick:s[0]||(s[0]=(...a)=>e(M)&&e(M)(...a))},[u.value?(t(),p(e(F),{key:0,size:18,"stroke-width":2})):(t(),p(e(G),{key:1,size:18,"stroke-width":2})),b("span",_e,C(u.value?e(o).t("Expand"):e(o).t("Collapse")),1)],8,ve)],64))],10,le)}}}),ge=O(pe,[["__scopeId","data-v-202e105b"]]),fe={class:"config-layout"},ye={class:"config-layout__main"},ke=B({__name:"ConfigurationLayout",setup(l){const o=J(),v=Q(),d=g(()=>[{to:"/configuration/general",label:n("General"),icon:P},{to:"/configuration/users",label:n("Users"),icon:ne},{to:"/configuration/dvb",label:n("DVB Inputs"),icon:ae},{to:"/configuration/channel-epg",label:n("Channel / EPG"),icon:Z},{to:"/configuration/stream",label:n("Stream"),icon:se},{to:"/configuration/recording",label:n("Recording"),icon:ee},{to:"/configuration/cas",label:n("CAs"),icon:oe,requiredCapability:"caclient",requiredLevel:v.has("caclient_advanced")?"advanced":"expert"},{to:"/configuration/debugging",label:n("Debugging"),icon:te,requiredLevel:"advanced"}]),f=g(()=>d.value.filter(r=>!(r.requiredCapability&&!v.has(r.requiredCapability)||r.requiredLevel&&!Y(r.requiredLevel,o.uilevel))));return(r,_)=>{const y=T("router-view");return t(),i("article",fe,[L(ge,{tabs:f.value,"l1-icon":e(P),"aria-label":e(n)("Configuration sub-section navigation")},null,8,["tabs","l1-icon","aria-label"]),b("main",ye,[L(y)])])}}}),we=O(ke,[["__scopeId","data-v-05a19333"]]);export{we as default};
