import{C as e,D as t,J as n,M as r,N as i,P as a,Q as o,S as s,V as c,W as l,Y as u,a as d,at as f,b as p,et as m,ft as h,it as g,j as _,k as v,l as y,n as b,nt as x,ot as S,q as C,st as w,t as T,w as E,x as D,y as O}from"../../client.js";import k from"../tooltip/Tooltip.js";import{A,T as j}from"../../components.js";import{t as ee}from"../../floating-item.svelte.js";import{n as te}from"../../sidebar-state.svelte.js";var M=a(`<span class="mc-sidebar__icon svelte-izmpz1"><!></span>`),N=a(`<!> <span class="mc-sidebar__text svelte-izmpz1"> </span> <!>`,1),P=a(`<div class="mc-sidebar__floating-item mc-sidebar__floating-item--tooltip mc-sidebar__floating-item--hidden svelte-izmpz1"><!></div>`),F=a(`<!> <!>`,1),I={hash:`svelte-izmpz1`,code:`/**
 * Do not edit directly, this file was auto-generated.
 */
@media screen and (min-width: 680px) {
}
@media screen and (min-width: 680px) {
}
@media screen and (min-width: 680px) {
}.mc-sidebar__floating-item.svelte-izmpz1 {position:absolute;padding-left:1.25rem;left:3rem;}.mc-sidebar__floating-item--tooltip.svelte-izmpz1 {top:0.25rem;}
@media screen and (min-width: 680px) {
}.mc-sidebar__floating-item--hidden.svelte-izmpz1 {visibility:hidden;overflow:hidden;opacity:0;height:0;pointer-events:none;}
@media screen and (min-width: 680px) {
}
@media screen and (min-width: 680px) {
}
@media screen and (min-width: 680px) {
}.mc-sidebar__link.svelte-izmpz1 {display:flex;align-items:center;gap:0.25rem;height:2.5rem;width:100%;padding-left:0.25rem;text-align:left;text-decoration:none;font-size:var(--font-size-150, 1rem);font-weight:var(--font-weight-semi-bold, 600);color:var(--sidebar-color-section-item-text-default, #404040);border-radius:var(--border-radius-m, 0.5rem);background:transparent;border:none;cursor:pointer;}.mc-sidebar__link--selected.svelte-izmpz1 {color:var(--sidebar-color-section-item-text-selected, #006902);background:var(--sidebar-color-section-item-background-selected, #ebf5de);}.mc-sidebar__link--locked.svelte-izmpz1 {pointer-events:none;}.mc-sidebar__link.svelte-izmpz1:not(.mc-sidebar__link--selected):hover {background:var(--sidebar-color-section-item-background-hover, rgba(0, 0, 0, 0.05));}.mc-sidebar__link.svelte-izmpz1:focus-visible {box-shadow:0 0 0 0.125rem var(--focus-color-mid, var(--focus-color-outline-mid, #ffffff)), 0 0 0 0.25rem var(--focus-color-outer, var(--focus-color-outline-outer, #000000));outline:0.125rem solid transparent;outline-offset:0.125rem;}.mc-sidebar__link.svelte-izmpz1:is(summary:where(.svelte-izmpz1)) .mc-sidebar__text:where(.svelte-izmpz1) {flex-grow:1;}.mc-sidebar__icon.svelte-izmpz1 {fill:currentcolor;width:1.5rem;height:1.5rem;}.mc-sidebar__text.svelte-izmpz1 {display:block;}.mc-sidebar__item.svelte-izmpz1 {position:relative;}.mc-sidebar__item--sub.mc-sidebar__item.svelte-izmpz1 .mc-sidebar__link:where(.svelte-izmpz1) {display:flex;align-items:center;justify-content:start;gap:0.25rem;padding-left:0.5rem;margin-bottom:0.125rem;height:2rem;text-decoration:none;color:var(--sidebar-color-section-item-text-default, #404040);border-radius:var(--border-radius-m, 0.5rem);background:transparent;border:none;cursor:pointer;}.mc-sidebar__item--sub.mc-sidebar__item.svelte-izmpz1 .mc-sidebar__link:where(.svelte-izmpz1) .mc-sidebar__text:where(.svelte-izmpz1) {display:block;font-size:var(--font-body-s, 0.875rem);font-weight:var(--font-weight-regular, 400);}.mc-sidebar__item--sub.mc-sidebar__item.svelte-izmpz1 .mc-sidebar__link--selected:where(.svelte-izmpz1) {color:var(--sidebar-color-section-item-text-selected, #006902);background:var(--sidebar-color-section-item-background-selected, #ebf5de);}.mc-sidebar__item--sub.mc-sidebar__item.svelte-izmpz1 .mc-sidebar__link:where(.svelte-izmpz1):not(.mc-sidebar__item--sub.mc-sidebar__item:where(.svelte-izmpz1) .mc-sidebar__link--selected:where(.svelte-izmpz1)):hover {background:var(--sidebar-color-section-item-background-hover, rgba(0, 0, 0, 0.05));}.mc-sidebar__item--sub.mc-sidebar__item.svelte-izmpz1 .mc-sidebar__link:where(.svelte-izmpz1):focus-visible {box-shadow:0 0 0 0.125rem var(--focus-color-mid, var(--focus-color-outline-mid, #ffffff)), 0 0 0 0.25rem var(--focus-color-outer, var(--focus-color-outline-outer, #000000));outline:0.125rem solid transparent;outline-offset:0.125rem;}.mc-sidebar__item--collapsed.svelte-izmpz1 .mc-sidebar__text:where(.svelte-izmpz1) {display:none;}.mc-sidebar__item--collapsed.svelte-izmpz1 .mc-sidebar__link:where(.svelte-izmpz1) {padding-left:0;justify-content:center;}`};function L(a,T){let L=e(T);w(T,!0),p(a,I);let R=b(T,`tag`,7,`li`),z=b(T,`id`,23,()=>crypto.randomUUID()),B=b(T,`label`,7),V=b(T,`href`,7),H=b(T,`locked`,7),U=b(T,`external`,7),W=b(T,`active`,7),G=b(T,`onclick`,7),K=b(T,`sub`,7),q,J=m(null),Y=m(null),{hideFloatingItem:X,showFloatingItem:Z}=ee(()=>c(J),()=>c(Y),{allowItemHover:!1}),ne=x(()=>H()?A:j),Q=m(!1);function re(){G()?.(),q.dispatchEvent(new CustomEvent(`item-click`,{bubbles:!0,composed:!0}))}let ie=x(()=>{if(V())return U()?`_blank`:`_self`});v(()=>{if(K()!==void 0)return;let e=f(`SUB_ITEM`);e!==void 0&&K(e??!1)});var ae={get tag(){return R()},set tag(e=`li`){R(e),g()},get id(){return z()},set id(e=crypto.randomUUID()){z(e),g()},get label(){return B()},set label(e){B(e),g()},get href(){return V()},set href(e){V(e),g()},get locked(){return H()},set locked(e){H(e),g()},get external(){return U()},set external(e){U(e),g()},get active(){return W()},set active(e){W(e),g()},get onclick(){return G()},set onclick(e){G(e),g()},get sub(){return K()},set sub(e){K(e),g()}},$=i();return D(n($),R,!1,(e,a)=>{O(e,()=>te({setExpanded:e=>o(Q,e,!0)})),d(e,e=>q=e,()=>q),y(e,()=>({class:{"mc-sidebar__item":!0,"mc-sidebar__item--collapsed":!c(Q)&&!K(),"mc-sidebar__item--sub":K()}}),void 0,void 0,void 0,`svelte-izmpz1`);var f=F(),p=n(f);D(p,()=>V()?`a`:`button`,!1,(e,a)=>{d(e,e=>o(J,e,!0),()=>c(J));var f=()=>re();y(e,()=>({href:V(),role:V()?`link`:`button`,target:c(ie),class:{"mc-sidebar__link":!0,"mc-sidebar__link--selected":W(),"mc-sidebar__link--locked":H()},"aria-label":B(),onmouseenter:Z,onfocus:Z,onmouseleave:X,onblur:X,onclick:f}),void 0,void 0,void 0,`svelte-izmpz1`);var p=N(),m=n(p),g=e=>{var t=M();E(C(t),T,`icon`,{},null),h(t),r(e,t)};t(m,e=>{L.icon&&e(g)});var v=u(m,2),b=C(v,!0);h(v);var x=u(v,2),S=e=>{var t=i();s(n(t),()=>c(ne),(e,t)=>{t(e,{})}),r(e,t)};t(x,e=>{(H()||U())&&e(S)}),l(()=>_(b,B())),r(a,p)});var m=u(p,2),g=e=>{var t=P();k(C(t),{get id(){return z()},get text(){return B()},standalone:!0,pointer:!1}),h(t),d(t,e=>o(Y,e),()=>c(Y)),r(e,t)};t(m,e=>{!c(Q)&&!K()&&e(g)}),r(a,f)}),r(a,$),S(ae)}customElements.define(`m-sidebar-nav-item`,T(L,{locked:{attribute:`locked`,reflect:!0,type:`Boolean`},external:{attribute:`external`,reflect:!0,type:`Boolean`},active:{attribute:`active`,reflect:!0,type:`Boolean`},sub:{attribute:`sub`,reflect:!0,type:`Boolean`},tag:{},id:{},label:{},href:{},onclick:{}},[`icon`],[],{mode:`open`}));export{L as default};
//# sourceMappingURL=SidebarNavItem.js.map