import{D as e,G as t,J as n,L as r,M as i,N as a,P as o,Q as s,R as c,V as l,W as u,Y as d,_ as f,a as p,b as m,d as h,et as g,ft as _,it as v,n as y,ot as b,q as x,st as S,t as C,v as w,w as T,y as E,z as D}from"../../client.js";import{R as O}from"../../components.js";import{t as k}from"../../floating-item.svelte.js";import{n as A}from"../../sidebar-state.svelte.js";var j=o(`<section><nav aria-label="shortcut items"><ul role="menu"><!></ul></nav></section>`),M=o(`<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>`),N={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 P(r,o){S(o,!0),m(r,N);let C=y(o,`id`,23,()=>crypto.randomUUID()),P=y(o,`stacked`,7),F=g(null);t(()=>{(l(U)?l(F):l(I))?.dispatchEvent(new CustomEvent(`update:stacked`,{detail:P(),bubbles:!0,composed:!0}))});let I=g(null),L=g(null),{floatingItemIsDisplayed:R,hideFloatingItem:z,showFloatingItem:B,onTriggerKeydown:V,onListboxKeydown:H}=k(()=>l(I),()=>l(L)),U=g(!1);var W={get id(){return C()},set id(e=crypto.randomUUID()){C(e),v()},get stacked(){return P()},set stacked(e){P(e),v()}},G=a(),K=n(G),q=e=>{var t=j(),n=x(t),r=x(n);T(x(r),o,`default`,{},null),_(r),_(n),_(t),E(t,()=>A({setExpanded:e=>s(U,e,!0)})),p(t,e=>s(F,e),()=>l(F)),u(()=>f(r,1,w({"mc-sidebar__shortcut-list":!0,"mc-sidebar__shortcut-list--stacked":P(),"mc-sidebar__shortcut-list--grid":!P()}),`svelte-17ny4fr`)),i(e,t)},J=e=>{var t=M(),n=x(t);O(x(n),{}),_(n),p(n,e=>s(I,e),()=>l(I));var r=d(n,2),a=x(r),f=x(a);T(x(f),o,`default`,{},null),_(f),_(a),_(r),p(r,e=>s(L,e),()=>l(L)),_(t),E(t,()=>A({setExpanded:e=>s(U,e,!0)})),u(()=>{h(n,`id`,`trigger-${C()}`),h(n,`aria-expanded`,R),h(n,`aria-controls`,`listbox-${C()}`),h(r,`id`,`listbox-${C()}`)}),D(`mouseenter`,n,B),D(`focus`,n,B),c(`keydown`,n,V),D(`mouseleave`,n,z),D(`blur`,n,z),c(`keydown`,r,H),D(`mouseleave`,r,z),D(`blur`,r,z),i(e,t)};return e(K,e=>{l(U)?e(q):e(J,-1)}),i(r,G),b(W)}r([`keydown`]),customElements.define(`m-sidebar-shortcuts`,C(P,{stacked:{attribute:`stacked`,reflect:!0,type:`Boolean`},id:{}},[`default`],[],{mode:`open`}));
//# sourceMappingURL=SidebarShortcuts.js.map