import{o as M,c as N,e as O,a as P,p as U,B as Q,i as a,v as p,y as R,x as W,b as w,d as Y,m as j,h as i,r as o,q as v,t as F,j as Z,n as $,s as ee,C as n,u as B,f as q}from"../../custom-element.js";import{i as te}from"../../if.js";import{s as C}from"../../slot.js";import{c as K,s as g}from"../../attributes.js";import{b as k}from"../../this.js";import{V as re}from"../../Condition20.js";import{u as se}from"../../floating-item.svelte.js";import{g as V}from"../../sidebar-state.svelte.js";import"../../branches.js";import"../../media-query.js";var ae=q('<section><nav aria-label="shortcut items"><ul role="menu"><!></ul></nav></section>'),ie=q('<div class="mc-sidebar__shortcut-wrapper svelte-17ny4fr"><button class="mc-sidebar__shortcut-item mc-sidebar__trigger svelte-17ny4fr" aria-label="Sidebar shortcuts" aria-haspopup="menu"><!></button> <div tabindex="0" role="menu" class="mc-sidebar__floating-item mc-sidebar__floating-item--hidden svelte-17ny4fr"><div class="mc-sidebar__listbox svelte-17ny4fr"><ul class="mc-sidebar__shortcut-list mc-sidebar__shortcut-list--floating mc-sidebar__shortcut-list mc-sidebar__shortcut-list--stacked svelte-17ny4fr"><!></ul></div></div></div>');const oe={hash:"svelte-17ny4fr",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-17ny4fr {position:absolute;padding-left:1.25rem;left:3rem;}
@media screen and (min-width: 680px) {
}.mc-sidebar__floating-item--hidden.svelte-17ny4fr {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__listbox.svelte-17ny4fr {min-width:18.75rem;border-radius:var(--border-radius-m, 0.5rem);background-color:var(--listbox-color-background, #ffffff);padding:1rem;display:flex;flex-direction:column;gap:0.25rem;box-shadow:var(--shadow-bottom-s-x, 0px) var(--shadow-bottom-s-y, 5px) var(--shadow-bottom-s-blur, 10px) var(--shadow-bottom-s-spread, -2px) rgba(0, 0, 0, var(--shadow-bottom-s-opacity, 20%));}.mc-sidebar__shortcut-wrapper.svelte-17ny4fr {width:100%;display:grid;justify-content:center;position:relative;}.mc-sidebar__shortcut-list.svelte-17ny4fr {display:flex;margin:0;}.mc-sidebar__shortcut-list--grid.svelte-17ny4fr {padding:0;gap:0.5rem;align-items:center;}.mc-sidebar__shortcut-list--stacked.svelte-17ny4fr {gap:0.25rem;flex-direction:column;padding:0;}.mc-sidebar__shortcut-list--stacked.svelte-17ny4fr:not(.mc-sidebar__shortcut-list--floating) {padding:0 0 0.5rem 1rem;margin-bottom:0.5rem;border-bottom:1px solid var(--divider-color-primary, #cccccc);}.mc-sidebar__shortcut-item.svelte-17ny4fr {cursor:pointer;display:flex;align-items:center;list-style:none;border-radius:var(--border-radius-m, 0.5rem);overflow:hidden;}.mc-sidebar__shortcut-item.svelte-17ny4fr:hover {background-color:var(--sidebar-color-shortcut-item-background-hover, rgba(70, 78, 99, 0.2));}.mc-sidebar__shortcut-item.svelte-17ny4fr:nth-child(n+5) {display:none;}.mc-sidebar__shortcut-item.svelte-17ny4fr:is(.mc-sidebar__trigger:where(.svelte-17ny4fr)) {width:3rem;height:3rem;justify-content:center;border:none;background-color:var(--sidebar-color-shortcut-item-background-default, rgba(70, 78, 99, 0.1));}.mc-sidebar__shortcut-item.svelte-17ny4fr:is(.mc-sidebar__trigger:where(.svelte-17ny4fr)):hover {background-color:var(--sidebar-color-shortcut-item-background-default, rgba(70, 78, 99, 0.1));}`};function de(I,l){O(l,!0),P(I,oe);let c=U(l,"id",23,()=>crypto.randomUUID()),m=U(l,"stacked",7),y=p(null);Q(()=>{(a(h)?a(y):a(_))?.dispatchEvent(new CustomEvent("update:stacked",{detail:m(),bubbles:!0,composed:!0}))});let _=p(null),x=p(null);const{floatingItemIsDisplayed:G,hideFloatingItem:f,showFloatingItem:S,onTriggerKeydown:L,onListboxKeydown:T}=se(()=>a(_),()=>a(x));let h=p(!1);var X={get id(){return c()},set id(t=crypto.randomUUID()){c(t),j()},get stacked(){return m()},set stacked(t){m(t),j()}},E=R(),z=W(E);{var A=t=>{var r=ae(),e=i(r),u=i(e),s=i(u);C(s,l,"default",{},null),o(u),o(e),o(r),K(r,()=>V({setExpanded:d=>v(h,d,!0)})),k(r,d=>v(y,d),()=>a(y)),F(()=>Z(u,1,$({"mc-sidebar__shortcut-list":!0,"mc-sidebar__shortcut-list--stacked":m(),"mc-sidebar__shortcut-list--grid":!m()}),"svelte-17ny4fr")),w(t,r)},H=t=>{var r=ie(),e=i(r),u=i(e);re(u,{}),o(e),k(e,b=>v(_,b),()=>a(_));var s=ee(e,2),d=i(s),D=i(d),J=i(D);C(J,l,"default",{},null),o(D),o(d),o(s),k(s,b=>v(x,b),()=>a(x)),o(r),K(r,()=>V({setExpanded:b=>v(h,b,!0)})),F(()=>{g(e,"id",`trigger-${c()}`),g(e,"aria-expanded",G),g(e,"aria-controls",`listbox-${c()}`),g(s,"id",`listbox-${c()}`)}),n("mouseenter",e,S),n("focus",e,S),B("keydown",e,L),n("mouseleave",e,f),n("blur",e,f),B("keydown",s,T),n("mouseleave",s,f),n("blur",s,f),w(t,r)};te(z,t=>{a(h)?t(A):t(H,-1)})}return w(I,E),Y(X)}M(["keydown"]);customElements.define("m-sidebar-shortcuts",N(de,{stacked:{attribute:"stacked",reflect:!0,type:"Boolean"},id:{}},["default"],[],{mode:"open"}));
//# sourceMappingURL=SidebarShortcuts.js.map
