{"code":"import * as tslib_1 from \"tslib\";\r\nimport { LitElement } from '@polymer/lit-element';\r\nimport { html } from 'lit-html';\r\nimport { bindAttributes, component, property } from '../../util/decorators';\r\nimport CSS from './icon-css';\r\nlet Icon = class Icon extends LitElement {\r\n    constructor() {\r\n        super(...arguments);\r\n        this.color = 'main';\r\n        this.size = 'main';\r\n    }\r\n    _render({ color, type }) {\r\n        const children = this._symbol || [];\r\n        return html `\n            ${CSS}\n            <style>zen-icon {display: none}</style>\n            <svg\n                viewBox=\"0 0 40 40\"\n                preserveAspectRatio=\"xMidYMid meet\"\n                focusable=\"false\"\n                style=\"pointer-events: none; display: block; width: 100%; height: 100%;\" class=\"${color}\"\n            >${children.map(c => html `${c}`)}</svg>\n        `;\r\n    }\r\n    get _symbol() {\r\n        if (!this.type)\r\n            return;\r\n        let newIcon = document.querySelector(`#zen-icon-${this.type}`);\r\n        if (!newIcon)\r\n            return console.error(`Icon ${this.type} not found`);\r\n        newIcon = newIcon.cloneNode(true);\r\n        return Array.from(newIcon.children);\r\n    }\r\n};\r\nIcon._boundAttributes = ['type', 'color', 'size'];\r\ntslib_1.__decorate([\r\n    property,\r\n    tslib_1.__metadata(\"design:type\", String)\r\n], Icon.prototype, \"type\", void 0);\r\ntslib_1.__decorate([\r\n    property,\r\n    tslib_1.__metadata(\"design:type\", String)\r\n], Icon.prototype, \"color\", void 0);\r\ntslib_1.__decorate([\r\n    property,\r\n    tslib_1.__metadata(\"design:type\", String)\r\n], Icon.prototype, \"size\", void 0);\r\nIcon = tslib_1.__decorate([\r\n    component('zen-icon'),\r\n    bindAttributes\r\n], Icon);\r\nexport default Icon;\r\n","dts":{"name":"/Users/tristanmatthias/projects/origami/zen/packages/components/Icon/Icon.d.ts","text":"import { LitElement } from '@polymer/lit-element';\r\nimport { TemplateResult } from 'lit-html';\r\nexport interface props {\r\n    type?: string;\r\n    color?: string;\r\n    size?: string;\r\n}\r\nexport default class Icon extends LitElement implements props {\r\n    type?: string;\r\n    color?: string;\r\n    size?: string;\r\n    static _boundAttributes: string[];\r\n    _render({color, type}: {\r\n        [key in keyof Icon]: any;\r\n    }): TemplateResult;\r\n    private readonly _symbol;\r\n}\r\n"}}
