!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"));else if("function"==typeof define&&define.amd)define(["lit","lit/decorators.js","lit/directives/class-map.js","lit/directives/style-map.js","lit/directives/if-defined.js","@momentum-ui/icons/data/momentumUiIconsNames.json","@momentum-ui/utils/lib/getColorValue","mobx"],t);else{var i="object"==typeof exports?t(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx")):t(e.lit,e["lit/decorators.js"],e["lit/directives/class-map.js"],e["lit/directives/style-map.js"],e["lit/directives/if-defined.js"],e["@momentum-ui/icons/data/momentumUiIconsNames.json"],e["@momentum-ui/utils/lib/getColorValue"],e.mobx);for(var o in i)("object"==typeof exports?exports:e)[o]=i[o]}}(self,(e,t,i,o,r,s,l,a)=>(()=>{"use strict";var n,d={23(e,t,i){i.r(t),i.d(t,{Favorite:()=>o}),i(1821);var o,r=i(2900),s=i(7704),l=i(9609),a=i(4084),n=i(7161),d=i(429),c=i(5125),u=i(291),m=i(6816),p=function(e,t,i,o){var r,s=arguments.length,l=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(l=(s<3?r(l):s>3?r(t,i,l):r(t,i))||l);return s>3&&l&&Object.defineProperty(t,i,l),l};!function(e){let t=class extends((0,s.yC)(n.LitElement)){constructor(){super(...arguments),this.disabled=!1,this.checked=!1,this.value="Select favorite",this.id="",this.label="Favorite"}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this.handleElectKeyDown),this.addEventListener("click",this.handleFavorite)}static get styles(){return[a.A,m.A]}handleFavorite(){this.disabled||(this.checked=!this.checked,this.dispatchEvent(new CustomEvent("favorite-toggle",{detail:{active:this.checked,value:this.value},bubbles:!0,composed:!0})))}handleElectKeyDown(e){e.code!==r.Uz.Enter&&e.code!==r.Uz.Space||(this.checked=!this.checked,this.dispatchEvent(new CustomEvent("favorite-keydown",{detail:{active:this.checked,value:this.value},bubbles:!0,composed:!0})))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this.handleElectKeyDown),this.removeEventListener("click",this.handleFavorite)}get favoriteClassMap(){return{"md-favorite--active":this.checked,"md-favorite--disabled":this.disabled}}render(){return n.html`
        <label
          for="favorite-checkbox"
          id="${this.id}"
          class="md-favorite ${(0,c.classMap)(this.favoriteClassMap)}"
          tabindex="0"
        >
          <input
            type="checkbox"
            aria-label=${(0,u.ifDefined)(this.label.length?this.label:void 0)}
            value=${this.value}
            ?checked=${this.checked}
            ?disabled=${this.disabled}
            aria-hidden="true"
            name="favorite-checkbox"
          />
          <md-icon
            name="${this.checked?"favorite-filled":"favorite-bold"}"
            iconSet="momentumDesign"
            size="16"
          ></md-icon>
        </label>
      `}};p([(0,d.property)({type:Boolean})],t.prototype,"disabled",void 0),p([(0,d.property)({type:Boolean})],t.prototype,"checked",void 0),p([(0,d.property)({type:String})],t.prototype,"value",void 0),p([(0,d.property)({type:String})],t.prototype,"id",void 0),p([(0,d.property)({type:String})],t.prototype,"label",void 0),t=p([(0,l.w)("md-favorite")],t),e.ELEMENT=t}(o||(o={}))},2022(e){e.exports=s},554(e){e.exports=l},7161(t){t.exports=e},429(e){e.exports=t},5125(e){e.exports=i},291(e){e.exports=r},318(e){e.exports=o},5314(e){e.exports=a}},c={};function u(e){var t=c[e];if(void 0!==t)return t.exports;var i=c[e]={exports:{}};return d[e](i,i.exports,u),i.exports}u.m=d,n=[],u.O=(e,t,i,o)=>{if(!t){var r=1/0;for(d=0;d<n.length;d++){for(var[t,i,o]=n[d],s=!0,l=0;l<t.length;l++)(!1&o||r>=o)&&Object.keys(u.O).every(e=>u.O[e](t[l]))?t.splice(l--,1):(s=!1,o<r&&(r=o));if(s){n.splice(d--,1);var a=i();void 0!==a&&(e=a)}}return e}o=o||0;for(var d=n.length;d>0&&n[d-1][2]>o;d--)n[d]=n[d-1];n[d]=[t,i,o]},u.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return u.d(t,{a:t}),t},u.d=(e,t)=>{for(var i in t)u.o(t,i)&&!u.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),u.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={6920:0};u.O.j=t=>0===e[t];var t=(t,i)=>{var o,r,[s,l,a]=i,n=0;if(s.some(t=>0!==e[t])){for(o in l)u.o(l,o)&&(u.m[o]=l[o]);if(a)var d=a(u)}for(t&&t(i);n<s.length;n++)r=s[n],u.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return u.O(d)},i=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})();var m=u.O(void 0,[9609,4084,3305,4739,7154,9773,5983,9488,1821,2364,9938,4781,5201,5584,8227,2900,7704,6816],()=>u(23));return u.O(m)})());