import{o as ee,c as ae,e as te,a as se,p as B,i as u,y as ie,x as re,b as f,d as le,v as C,m as K,h as a,s as p,r as t,q as E,t as R,k as X,C as m,u as j,f as S}from"../../custom-element.js";import{i as L}from"../../if.js";import{a as oe,s as D}from"../../slot.js";import{c as M,s as w}from"../../attributes.js";import{b as G}from"../../this.js";import{u as ne}from"../../floating-item.svelte.js";import{p as de}from"../../Condition20.js";import{g as H,s as ce}from"../../sidebar-state.svelte.js";import"../../branches.js";import"../../media-query.js";var me=S('<span class="mc-sidebar__icon svelte-1c38lw3"><!></span>'),be=S('<li class="mc-sidebar__item svelte-1c38lw3"><details class="mc-sidebar__link-expand svelte-1c38lw3" open=""><summary class="mc-sidebar__link svelte-1c38lw3"><!> <span class="mc-sidebar__text svelte-1c38lw3"> </span> <span class="mc-sidebar__sub svelte-1c38lw3"><!></span></summary> <ul class="mc-sidebar__sublist svelte-1c38lw3"><!></ul></details></li>'),ve=S('<span class="mc-sidebar__icon svelte-1c38lw3"><!></span>'),_e=S('<div class="mc-sidebar__item svelte-1c38lw3"><button class="mc-sidebar__trigger mc-sidebar__link svelte-1c38lw3" aria-haspopup="listbox"><!></button> <div class="mc-sidebar__floating-item mc-sidebar__floating-item--hidden svelte-1c38lw3" tabindex="0" role="menu"><div class="mc-sidebar__listbox svelte-1c38lw3"><h3 class="mc-sidebar__listbox-title svelte-1c38lw3"> </h3> <ul class="mc-sidebar__list svelte-1c38lw3"><!></ul></div></div></div>');const ue={hash:"svelte-1c38lw3",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-1c38lw3 {position:absolute;padding-left:1.25rem;left:3rem;}
@media screen and (min-width: 680px) {
}.mc-sidebar__floating-item--hidden.svelte-1c38lw3 {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-1c38lw3 {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__listbox-title.svelte-1c38lw3 {font-size:var(--font-size-150, 1rem);font-weight:var(--font-weight-semi-bold, 600);padding-bottom:0.75rem;margin:0;border-bottom:1px solid var(--divider-color-primary, #cccccc);color:var(--sidebar-color-shortcut-item-text-default, #404040);}.mc-sidebar__list.svelte-1c38lw3 {list-style-type:none;margin:0;padding:0;}.mc-sidebar__link.svelte-1c38lw3 {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.svelte-1c38lw3:not(.mc-sidebar__link--selected):hover {background:var(--sidebar-color-section-item-background-hover, rgba(0, 0, 0, 0.05));}.mc-sidebar__link.svelte-1c38lw3: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-expand.svelte-1c38lw3:open .mc-sidebar__sub:where(.svelte-1c38lw3) {transform:rotate(180deg);}.mc-sidebar__link.svelte-1c38lw3:is(summary:where(.svelte-1c38lw3)) .mc-sidebar__text:where(.svelte-1c38lw3) {flex-grow:1;}.mc-sidebar__icon.svelte-1c38lw3 {fill:currentcolor;width:1.5rem;height:1.5rem;}.mc-sidebar__text.svelte-1c38lw3 {display:block;}.mc-sidebar__sub.svelte-1c38lw3 {width:1.25rem;height:1.25rem;}.mc-sidebar__sublist.svelte-1c38lw3 {list-style-type:none;margin:0;padding:0 0 0 2rem;display:flex;flex-direction:column;gap:0.25rem;}.mc-sidebar__item.svelte-1c38lw3 {position:relative;}`};function fe(T,l){const q=oe(l);te(l,!0),se(T,ue);let b=B(l,"id",23,()=>crypto.randomUUID()),h=B(l,"label",7),z=B(l,"menulabel",7),U=C(null),A=C(null);const{floatingItemIsDisplayed:J,hideFloatingItem:g,showFloatingItem:N,onTriggerKeydown:O,onListboxKeydown:Q}=ne(()=>u(U),()=>u(A));let F=C(!1);var V={get id(){return b()},set id(s=crypto.randomUUID()){b(s),K()},get label(){return h()},set label(s){h(s),K()},get menulabel(){return z()},set menulabel(s){z(s),K()}},P=ie(),W=re(P);{var Y=s=>{var r=be(),e=a(r),d=a(e),x=a(d);{var o=n=>{var _=me(),$=a(_);D($,l,"icon",{},null),t(_),f(n,_)};L(x,n=>{q.icon&&n(o)})}var c=p(x,2),v=a(c,!0);t(c);var y=p(c,2),k=a(y);de(k,{}),t(y),t(d);var I=p(d,2),i=a(I);D(i,l,"default",{},null),t(I),t(e),t(r),M(r,()=>H({setExpanded:n=>E(F,n,!0)})),M(r,()=>ce("M-SIDEBAR-EXPANDABLE-ITEM")),R(()=>{w(d,"aria-label",h()),X(v,h())}),f(s,r)},Z=s=>{var r=_e(),e=a(r),d=a(e);{var x=i=>{var n=ve(),_=a(n);D(_,l,"icon",{},null),t(n),f(i,n)};L(d,i=>{q.icon&&i(x)})}t(e),G(e,i=>E(U,i),()=>u(U));var o=p(e,2),c=a(o),v=a(c),y=a(v,!0);t(v);var k=p(v,2),I=a(k);D(I,l,"default",{},null),t(k),t(c),t(o),G(o,i=>E(A,i),()=>u(A)),t(r),M(r,()=>H({setExpanded:i=>E(F,i,!0)})),R(()=>{w(e,"id",b()),w(e,"aria-expanded",J),w(e,"aria-controls",`listbox-${b()}`),w(o,"id",`listbox-${b()}`),X(y,z())}),m("mouseenter",e,N),m("focus",e,N),j("keydown",e,O),m("mouseleave",e,g),m("blur",e,g),j("keydown",o,Q),m("mouseleave",o,g),m("blur",o,g),f(s,r)};L(W,s=>{u(F)?s(Y):s(Z,-1)})}return f(T,P),le(V)}ee(["keydown"]);customElements.define("m-sidebar-expandable-item",ae(fe,{id:{},label:{},menulabel:{}},["icon","default"],[],{mode:"open"}));
//# sourceMappingURL=SidebarExpandableItem.js.map
