var e,t,s={5410(e,t,s){s.d(t,{D:()=>i});var i,r=s(9609),d=s(4084),a=s(2927),o=s(8899),l=s(4955),n=s(3517),p=s(3051),c=function(e,t,s,i){var r,d=arguments.length,a=d<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,i);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(a=(d<3?r(a):d>3?r(t,s,a):r(t,s))||a);return d>3&&a&&Object.defineProperty(t,s,a),a};!function(e){let t=class extends a.LitElement{constructor(){super(...arguments),this.href="",this.label="",this.tabIndex=-1,this._disabled=!1,this._selected=!1}get disabled(){return this._disabled}set disabled(e){const t=this._disabled;this._disabled=e,this.setAttribute("aria-disabled",`${e}`),this.tabIndex=e?-1:0,this.requestUpdate("disabled",t)}get selected(){return this._selected}set selected(e){const t=this._selected;this._selected=e,e&&this.notifySelectedItem(),this.setAttribute("aria-selected",`${e}`),this.requestUpdate("selected",t)}static get styles(){return[d.A,p.A]}setupEvents(){this.addEventListener("mousedown",this.handleClick),this.addEventListener("keydown",this.handleKeyDown)}firstUpdated(e){super.firstUpdated(e),this.label&&this.setAttribute("aria-label",this.label),this.setupEvents()}update(e){super.update(e),e.has("disabled")&&(this.selected=!1,this.setAttribute("aria-disabled",`${this.disabled}`))}handleClick(e){e.preventDefault(),this.dispatchEvent(new CustomEvent("menu-item-click",{detail:{id:this.id},bubbles:!0,composed:!0}))}handleKeyDown(e){this.dispatchEvent(new CustomEvent("menu-item-keydown",{detail:{id:this.id,key:e.code,srcEvent:e},bubbles:!0,composed:!0}))}notifySelectedItem(){this.dispatchEvent(new CustomEvent("focus-visible",{composed:!0,bubbles:!0}))}get menuItemClassMap(){return{"md-menu-item--selected":this.selected,disabled:this.disabled}}render(){return a.html`
        <li
          role="menuitem"
          part="menu-item"
          class="md-menu-item ${(0,l.classMap)(this.menuItemClassMap)}"
          ?disabled=${this.disabled}
          tabindex="-1"
          aria-hidden="true"
          aria-selected="false"
          aria-label=${(0,n.ifDefined)(this.label)}
        >
          <a href="${(0,n.ifDefined)(this.href||void 0)}">
            <slot></slot>
          </a>
        </li>
      `}};c([(0,o.property)({type:String})],t.prototype,"href",void 0),c([(0,o.property)({type:String})],t.prototype,"label",void 0),c([(0,o.property)({type:Number,reflect:!0})],t.prototype,"tabIndex",void 0),c([(0,o.property)({type:Boolean,reflect:!0})],t.prototype,"disabled",null),c([(0,o.property)({type:Boolean,reflect:!0})],t.prototype,"selected",null),t=c([(0,r.w)("md-menu-item")],t),e.ELEMENT=t}(i||(i={}))}},i={};function r(e){var t=i[e];if(void 0!==t)return t.exports;var d=i[e]={exports:{}};return s[e](d,d.exports,r),d.exports}r.m=s,e=[],r.O=(t,s,i,d)=>{if(!s){var a=1/0;for(p=0;p<e.length;p++){for(var[s,i,d]=e[p],o=!0,l=0;l<s.length;l++)(!1&d||a>=d)&&Object.keys(r.O).every(e=>r.O[e](s[l]))?s.splice(l--,1):(o=!1,d<a&&(a=d));if(o){e.splice(p--,1);var n=i();void 0!==n&&(t=n)}}return t}d=d||0;for(var p=e.length;p>0&&e[p-1][2]>d;p--)e[p]=e[p-1];e[p]=[s,i,d]},r.d=(e,t)=>{for(var s in t)r.o(t,s)&&!r.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);export{r as __webpack_require__};t={4825:0,5410:0},r.C=e=>{var s,i,{__webpack_esm_ids__:d,__webpack_esm_modules__:a,__webpack_esm_runtime__:o}=e,l=0;for(s in a)r.o(a,s)&&(r.m[s]=a[s]);for(o&&o(r);l<d.length;l++)i=d[l],r.o(t,i)&&t[i]&&t[i][0](),t[d[l]]=0;r.O()},r.O.j=e=>0===t[e];import*as d from"../9609.js";r.C(d);import*as a from"../4084.js";r.C(a);import*as o from"../4955.js";r.C(o);import*as l from"../3517.js";r.C(l);import*as n from"../546.js";r.C(n);import*as p from"../6518.js";r.C(p);import*as c from"../5432.js";r.C(c);var h=r.O(void 0,[9609,4084,4955,3517,546,6518,5432],()=>r(5410));const m=(h=r.O(h)).D;export{m as MenuItem};