import*as t from"lit";import*as e from"lit/directives/if-defined.js";import*as o from"lit/directives/class-map.js";import*as s from"lit/decorators.js";var r,i,l={2927(e,o,s){var r,i;e.exports=(r={LitElement:()=>t.LitElement,css:()=>t.css,html:()=>t.html},i={},s.d(i,r),i)},3517(t,o,s){var r,i;t.exports=(r={ifDefined:()=>e.ifDefined},i={},s.d(i,r),i)},4955(t,e,s){var r,i;t.exports=(r={classMap:()=>o.classMap},i={},s.d(i,r),i)},6328(t,e,o){o.d(e,{C:()=>n,j:()=>f}),o(2369);var s=o(7704),r=o(9609),i=o(4084),l=o(2927),a=o(8899),p=o(4955),c=o(3517),d=o(8687),m=function(t,e,o,s){var r,i=arguments.length,l=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,o):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,e,o,s);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(l=(i<3?r(l):i>3?r(e,o,l):r(e,o))||l);return i>3&&l&&Object.defineProperty(e,o,l),l};const n=["left","right"],h="md-toggle-switch__accessible-description";var f;!function(t){let e=class extends((0,s.yC)(l.LitElement)){constructor(){super(...arguments),this.htmlId="",this.label="toggle",this.description=void 0,this.checked=!1,this.disabled=!1,this.small=!1,this.smaller=!1,this.alignLabel="right",this.autofocus=!1}handleClick(){this.disabled||(this.checked=!this.checked)}get toggleSwitchClassMap(){return{"md-toggle-switch--small":this.small,"md-toggle-switch--smaller":this.smaller}}switchTemplate(){return"left"===this.alignLabel?l.html`
          <slot></slot>
          <span
            class="md-toggle-switch__label__container md-toggle-switch__label__container__left"
            part="toggle-label"
          ></span>
        `:l.html`
          <span class="md-toggle-switch__label__container" part="toggle-label"></span>
          <slot></slot>
        `}render(){return l.html`
        <div
          class="md-input-container md-toggle-switch ${(0,p.classMap)(this.toggleSwitchClassMap)}"
          @click=${this.handleClick}
        >
          <input
            type="checkbox"
            role="switch"
            class="md-toggle-switch__input"
            aria-label="${this.label}"
            .id=${this.htmlId}
            ?checked=${this.checked}
            ?disabled=${this.disabled}
            ?autofocus=${this.autofocus}
            tabindex=${this.disabled?-1:0}
            aria-describedby=${(0,c.ifDefined)(this.description?h:void 0)}
          />
          <md-label .htmlFor=${this.htmlId} class="md-toggle-switch__label"> ${this.switchTemplate()} </md-label>
          ${this.description&&l.html`
            <div id=${h} class="md-toggle-switch__accessible-description">
              ${this.description}
            </div>
          `}
        </div>
      `}static get styles(){return[i.A,d.A]}};m([(0,a.property)({type:String})],e.prototype,"htmlId",void 0),m([(0,a.property)({type:String})],e.prototype,"label",void 0),m([(0,a.property)({type:String})],e.prototype,"description",void 0),m([(0,a.property)({type:Boolean})],e.prototype,"checked",void 0),m([(0,a.property)({type:Boolean})],e.prototype,"disabled",void 0),m([(0,a.property)({type:Boolean})],e.prototype,"small",void 0),m([(0,a.property)({type:Boolean})],e.prototype,"smaller",void 0),m([(0,a.property)({type:String})],e.prototype,"alignLabel",void 0),m([(0,a.property)({type:Boolean,reflect:!0})],e.prototype,"autofocus",void 0),e=m([(0,r.w)("md-toggle-switch")],e),t.ELEMENT=e}(f||(f={}))},8899(t,e,o){var r,i;t.exports=(r={property:()=>s.property},i={},o.d(i,r),i)}},a={};function p(t){var e=a[t];if(void 0!==e)return e.exports;var o=a[t]={exports:{}};return l[t](o,o.exports,p),o.exports}p.m=l,r=[],p.O=(t,e,o,s)=>{if(!e){var i=1/0;for(d=0;d<r.length;d++){for(var[e,o,s]=r[d],l=!0,a=0;a<e.length;a++)(!1&s||i>=s)&&Object.keys(p.O).every(t=>p.O[t](e[a]))?e.splice(a--,1):(l=!1,s<i&&(i=s));if(l){r.splice(d--,1);var c=o();void 0!==c&&(t=c)}}return t}s=s||0;for(var d=r.length;d>0&&r[d-1][2]>s;d--)r[d]=r[d-1];r[d]=[e,o,s]},p.d=(t,e)=>{for(var o in e)p.o(e,o)&&!p.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},p.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);export{p as __webpack_require__};i={502:0,1745:0,3539:0,4928:0,5369:0,6060:0,8111:0,8442:0},p.C=t=>{var e,o,{__webpack_esm_ids__:s,__webpack_esm_modules__:r,__webpack_esm_runtime__:l}=t,a=0;for(e in r)p.o(r,e)&&(p.m[e]=r[e]);for(l&&l(p);a<s.length;a++)o=s[a],p.o(i,o)&&i[o]&&i[o][0](),i[s[a]]=0;p.O()},p.O.j=t=>0===i[t];import*as c from"../9609.js";p.C(c);import*as d from"../4084.js";p.C(d);import*as m from"../2364.js";p.C(m);import*as n from"../9938.js";p.C(n);import*as h from"../4781.js";p.C(h);import*as f from"../5201.js";p.C(f);import*as g from"../5584.js";p.C(g);import*as y from"../8227.js";p.C(y);import*as _ from"../7704.js";p.C(_);import*as v from"../3970.js";p.C(v);import*as b from"../2369.js";p.C(b);import*as u from"../5757.js";p.C(u);import*as j from"../8687.js";p.C(j);var w=p.O(void 0,[9609,4084,2364,9938,4781,5201,5584,8227,7704,3970,2369,5757,8687],()=>p(6328));const C=(w=p.O(w)).j,k=w.C;export{C as ToggleSwitch,k as alignLabel};