var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
import { LitElement, html, css } from 'lit';
import { property } from 'lit/decorators.js';
import { classMap } from 'lit/directives/class-map.js';
import { partMap, generateColorVaries, generateGradientVaries, generateSizeVaries } from '@tinijs/core';
export const ICON_LEANPUB = 'icon-leanpub';
export class IconLeanpubComponent extends LitElement {
    constructor() {
        super(...arguments);
        this.rootClassesParts = {};
    }
    static { this.defaultTagName = ICON_LEANPUB; }
    static { this.styles = css `:host{--icon-width:var(--size-md-2x);--icon-height:var(--size-md-2x);--icon-color:none;--icon-image:url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1NzYgNTEyIj48cGF0aCBkPSJtMzg2LjUzOSAxMTEuNDg1IDE1LjA5NiAyNDguOTU1LTEwLjk3OS0uMjc1Yy0zNi4yMzItLjgyNC03MS42NCA4Ljc4My0xMDIuNjU3IDI3Ljk5Ny0zMS4wMTYtMTkuMjE0LTY2LjQyNC0yNy45OTctMTAyLjY1Ny0yNy45OTctNDUuNTY0IDAtODIuMDcgMTAuNzA1LTEyMy41MTYgMjcuNzIzTDkzLjExNyAxMjkuNmMyOC41NDYtMTEuODAzIDYxLjQ4NC0xOC4xMTUgOTIuMjI2LTE4LjExNSA0MS4xNzMgMCA3My44MzYgMTMuMTc1IDEwMi42NTcgNDIuNTQ0IDI3LjcyMy0yOC4yNzEgNTkuMDEzLTQxLjcyMSA5OC41MzktNDIuNTQ0ek01NjkuMDcgNDQ4Yy0yN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i{display:flex;align-items:center;justify-content:center;background-image:var(--icon-image);background-repeat:no-repeat;background-size:contain;background-position:center;width:var(--icon-width);height:var(--icon-height)}.recolor{background:var(--icon-color);-webkit-mask-image:var(--icon-image);-webkit-mask-size:var(--icon-width) var(--icon-height);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:var(--icon-image);mask-size:var(--icon-width) var(--icon-height);mask-repeat:no-repeat;mask-position:center}${generateColorVaries(({ name, color }) => `.scheme-${name} {--icon-color: ${color};}`)}${generateGradientVaries(({ name, gradient }) => `.scheme-${name} {--icon-color: ${gradient};}`)}${generateSizeVaries(size => `.size-${size} {--icon-width: var(--size-${size}-2x);--icon-height: var(--size-${size}-2x);}`)}`; }
    willUpdate() { this.rootClassesParts = { root: true, recolor: !!this.scheme, [`size-${this.size}`]: !!this.size, [`scheme-${this.scheme}`]: !!this.scheme }; }
    render() { return html `<i part=${partMap(this.rootClassesParts)} class=${classMap(this.rootClassesParts)}></i>`; }
}
__decorate([
    property({ type: String, reflect: true })
], IconLeanpubComponent.prototype, "size", void 0);
__decorate([
    property({ type: String, reflect: true })
], IconLeanpubComponent.prototype, "scheme", void 0);
//# sourceMappingURL=leanpub.js.map