import*as e from"@momentum-ui/icons/data/momentumUiIconsNames.json";import*as t from"@momentum-ui/utils/lib/getColorValue";import*as o from"lit";import*as i from"lit/decorators.js";import*as r from"lit/directives/class-map.js";import*as s from"lit/directives/if-defined.js";import*as a from"lit/directives/style-map.js";import*as d from"mobx";var n,l,p={4466(e,t,o){o.d(t,{A:()=>i}),o(1821);var i,r=o(7704),s=o(9609),a=o(93),d=o(4084),n=o(2927),l=o(8899),p=o(3517),c=o(742),m=function(e,t,o,i){var r,s=arguments.length,a=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,i);else for(var d=e.length-1;d>=0;d--)(r=e[d])&&(a=(s<3?r(a):s>3?r(t,o,a):r(t,o))||a);return s>3&&a&&Object.defineProperty(t,o,a),a};!function(e){let t=class extends((0,r.yC)(n.LitElement)){constructor(){super(...arguments),this._expanded=!1,this._level=3,this.uniqueId=(0,a.O)("accordion-item"),this.label="",this.disabled=!1,this.doubleClickToExpand=!1}get expanded(){return this._expanded}set expanded(e){const t=this._expanded;this._expanded=e,e?(this.notifyAccordionFocus(),this.notifyExpandedHeader()):this.notifyCollapsedHeader(),this.requestUpdate("expanded",t)}get level(){return this._level}set level(e){const t=this.level;e<1||e>6?(console.warn("Please set appropriate section heading level"),this._level=3):this._level=e,this.requestUpdate("level",t)}notifyExpandedHeader(){this.dispatchEvent(new CustomEvent("accordion-item-expanded",{composed:!0,bubbles:!0,detail:{id:this.uniqueId}}))}notifyCollapsedHeader(){this.dispatchEvent(new CustomEvent("accordion-item-collapsed",{composed:!0,bubbles:!0,detail:{id:this.uniqueId}}))}notifyAccordionFocus(){this.dispatchEvent(new CustomEvent("focus-visible",{composed:!0,bubbles:!0}))}firstUpdated(e){super.firstUpdated(e),this.setAttribute("id",this.uniqueId)}static get styles(){return[d.A,c.A]}handleClickEvent(e){if(this.disabled)return;const t="dblclick"===e.type;this.doubleClickToExpand===t&&this.dispatchEvent(new CustomEvent("accordion-item-click",{detail:{srcEvent:e},composed:!0,bubbles:!0}))}handleKeyDown(e){this.disabled||this.dispatchEvent(new CustomEvent("accordion-item-keydown",{detail:{srcEvent:e},bubbles:!0,composed:!0}))}render(){return n.html`
        <div class="md-accordion-item">
          <div role="heading" aria-level=${this.level} class="md-accordion-header" part="accordion-header">
            <button
              type="button"
              aria-expanded=${this.expanded}
              class="md-accordion-expander"
              aria-label=${(0,p.ifDefined)(this.label||void 0)}
              aria-controls="panel-${this.uniqueId}"
              aria-disabled=${this.disabled}
              ?disabled=${this.disabled}
              id="header-${this.uniqueId}"
              part="accordion-button"
              tabindex=${(0,p.ifDefined)(this.disabled?-1:void 0)}
              @click=${this.handleClickEvent}
              @dblclick=${this.handleClickEvent}
              @keydown=${this.handleKeyDown}
            >
              <slot name="header-content">
                <span class="md-accordion-expander-label">${this.label}</span>
              </slot>
              <md-icon iconSet=${"momentumDesign"} size="14" name="arrow-down-bold"></md-icon>
            </button>
          </div>
          <div
            role="region"
            id="panel-${this.uniqueId}"
            aria-labelledby="header-${this.uniqueId}"
            class="md-accordion-panel"
            part="accordion-panel"
          >
            <slot></slot>
          </div>
        </div>
      `}};m([(0,l.property)({type:String})],t.prototype,"label",void 0),m([(0,l.property)({type:Boolean,reflect:!0})],t.prototype,"disabled",void 0),m([(0,l.property)({type:Boolean,attribute:"double-click-to-expand"})],t.prototype,"doubleClickToExpand",void 0),m([(0,l.property)({type:Boolean,reflect:!0})],t.prototype,"expanded",null),m([(0,l.property)({type:Number,reflect:!0})],t.prototype,"level",null),m([(0,l.query)(".md-accordion-expander")],t.prototype,"header",void 0),t=m([(0,s.w)("md-accordion-item")],t),e.ELEMENT=t}(i||(i={}))},9500(t,o,i){var r,s;t.exports=(r={default:()=>e.default},s={},i.d(s,r),s)},3496(e,o,i){var r,s;e.exports=(r={default:()=>t.default},s={},i.d(s,r),s)},2927(e,t,i){var r,s;e.exports=(r={LitElement:()=>o.LitElement,css:()=>o.css,html:()=>o.html,nothing:()=>o.nothing},s={},i.d(s,r),s)},8899(e,t,o){var r,s;e.exports=(r={property:()=>i.property,query:()=>i.query,state:()=>i.state},s={},o.d(s,r),s)},4955(e,t,o){var i,s;e.exports=(i={classMap:()=>r.classMap},s={},o.d(s,i),s)},3517(e,t,o){var i,r;e.exports=(i={ifDefined:()=>s.ifDefined},r={},o.d(r,i),r)},1156(e,t,o){var i,r;e.exports=(i={styleMap:()=>a.styleMap},r={},o.d(r,i),r)},4980(e,t,o){var i,r;e.exports=(i={action:()=>d.action,observable:()=>d.observable},r={},o.d(r,i),r)}},c={};function m(e){var t=c[e];if(void 0!==t)return t.exports;var o=c[e]={exports:{}};return p[e](o,o.exports,m),o.exports}m.m=p,n=[],m.O=(e,t,o,i)=>{if(!t){var r=1/0;for(l=0;l<n.length;l++){for(var[t,o,i]=n[l],s=!0,a=0;a<t.length;a++)(!1&i||r>=i)&&Object.keys(m.O).every(e=>m.O[e](t[a]))?t.splice(a--,1):(s=!1,i<r&&(r=i));if(s){n.splice(l--,1);var d=o();void 0!==d&&(e=d)}}return e}i=i||0;for(var l=n.length;l>0&&n[l-1][2]>i;l--)n[l]=n[l-1];n[l]=[t,o,i]},m.d=(e,t)=>{for(var o in t)m.o(t,o)&&!m.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},m.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);export{m as __webpack_require__};l={502:0,1745:0,2330:0,4545:0,4928:0,5369:0,6060:0,6920:0,8111:0,8442:0},m.C=e=>{var t,o,{__webpack_esm_ids__:i,__webpack_esm_modules__:r,__webpack_esm_runtime__:s}=e,a=0;for(t in r)m.o(r,t)&&(m.m[t]=r[t]);for(s&&s(m);a<i.length;a++)o=i[a],m.o(l,o)&&l[o]&&l[o][0](),l[i[a]]=0;m.O()},m.O.j=e=>0===l[e];import*as u from"../9609.js";m.C(u);import*as f from"../4084.js";m.C(f);import*as h from"../3305.js";m.C(h);import*as v from"../4739.js";m.C(v);import*as b from"../7154.js";m.C(b);import*as y from"../9773.js";m.C(y);import*as x from"../5983.js";m.C(x);import*as C from"../9488.js";m.C(C);import*as j from"../1821.js";m.C(j);import*as E from"../2364.js";m.C(E);import*as _ from"../9938.js";m.C(_);import*as g from"../4781.js";m.C(g);import*as w from"../5201.js";m.C(w);import*as k from"../5584.js";m.C(k);import*as O from"../8227.js";m.C(O);import*as $ from"../2900.js";m.C($);import*as q from"../7704.js";m.C(q);import*as I from"../93.js";m.C(I);import*as A from"../742.js";m.C(A);var D=m.O(void 0,[9609,4084,3305,4739,7154,9773,5983,9488,1821,2364,9938,4781,5201,5584,8227,2900,7704,93,742],()=>m(4466));const M=(D=m.O(D)).A;export{M as AccordionItem};