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_WHMCS = 'icon-whmcs';
export class IconWhmcsComponent extends LitElement {
    constructor() {
        super(...arguments);
        this.rootClassesParts = {};
    }
    static { this.defaultTagName = ICON_WHMCS; }
    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,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0NDggNTEyIj48cGF0aCBkPSJNNDQ4IDE2MXYtMjEuM2wtMjguNS04LjgtMi4yLTEwLjQgMjAuMS0yMC43TDQyNyA4MC40bC0yOSA3LjUtNy4yLTcuNSA3LjUtMjguMi0xOS4xLTExLjYtMjEuMyAyMS0xMC43LTMuMi03LTI2LjRoLTIyLjZsLTYuMiAyNi40LTEyLjEgMy4yLTE5LjctMjEtMTkuNCAxMSA4LjEgMjcuNy04LjEgOC40LTI4LjUtNy41LTExIDE5LjEgMjAuNyAyMS0yLjkgMTAuNC0yOC41IDcuOC0uMyAyMS43IDI4LjggNy41IDIuNCAxMi4xLTIwLjEgMTkuOSAxMC40IDE4LjUgMjkuNi03LjUgNy4yIDguNi04LjEgMjYuOSAxOS45IDExLjYgMTkuNC0yMC40IDExLjYgMi45IDYuNyAyOC41IDIyLjYu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LjgtMy40IDIwLjQtMTIuMSA1LjgtMy41LTItNi41LTYuOC0yMS4yeiIvPjwvc3ZnPg==');display:inline-block}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 })
], IconWhmcsComponent.prototype, "size", void 0);
__decorate([
    property({ type: String, reflect: true })
], IconWhmcsComponent.prototype, "scheme", void 0);
//# sourceMappingURL=whmcs.js.map