{"code":"import * as tslib_1 from \"tslib\";\r\nimport { html, LitElement } from '@polymer/lit-element';\r\nimport * as p3Decorators from 'polymer3-decorators';\r\nimport * as decorators from '../../util/decorators';\r\nimport CSS from './button-css';\r\n/**\r\n * @class Button\r\n * The button element is a styled button with options of\r\n * adding an icon, loading state, and size.\r\n */\r\nlet Button = class Button extends LitElement {\r\n    get _icon() {\r\n        return this.shadowRoot.querySelector('zen-icon');\r\n    }\r\n    _render({ icon, size, hollow }) {\r\n        return html `\n            ${CSS}\n            ${icon\r\n            ? html `<zen-icon type=\"${icon}\" size=\"${size}\" color=\"${this._iconColor}\"></zen-icon>`\r\n            : ''}\n            <slot>Submit</slot>\n        `;\r\n    }\r\n    get _iconColor() {\r\n        if (this.hollow && this.color)\r\n            return this.color;\r\n        if (this.hollow && !this.color)\r\n            return 'main';\r\n        return 'white';\r\n    }\r\n    _iconChanged(newV) {\r\n        if (!newV && this.iconright)\r\n            this.iconright = false;\r\n    }\r\n};\r\nButton._boundAttributes = ['hollow', 'color', 'iconright', 'icon', 'disabled', 'size'];\r\ntslib_1.__decorate([\r\n    p3Decorators.property,\r\n    tslib_1.__metadata(\"design:type\", String)\r\n], Button.prototype, \"size\", void 0);\r\ntslib_1.__decorate([\r\n    p3Decorators.property,\r\n    tslib_1.__metadata(\"design:type\", Object)\r\n], Button.prototype, \"icon\", void 0);\r\ntslib_1.__decorate([\r\n    p3Decorators.property,\r\n    tslib_1.__metadata(\"design:type\", Boolean)\r\n], Button.prototype, \"iconright\", void 0);\r\ntslib_1.__decorate([\r\n    p3Decorators.property,\r\n    tslib_1.__metadata(\"design:type\", Boolean)\r\n], Button.prototype, \"hollow\", void 0);\r\ntslib_1.__decorate([\r\n    p3Decorators.property,\r\n    tslib_1.__metadata(\"design:type\", String)\r\n], Button.prototype, \"color\", void 0);\r\ntslib_1.__decorate([\r\n    p3Decorators.property,\r\n    tslib_1.__metadata(\"design:type\", Boolean)\r\n], Button.prototype, \"disabled\", void 0);\r\ntslib_1.__decorate([\r\n    p3Decorators.property,\r\n    tslib_1.__metadata(\"design:type\", Boolean)\r\n], Button.prototype, \"loading\", void 0);\r\ntslib_1.__decorate([\r\n    p3Decorators.observe('icon'),\r\n    tslib_1.__metadata(\"design:type\", Function),\r\n    tslib_1.__metadata(\"design:paramtypes\", [String]),\r\n    tslib_1.__metadata(\"design:returntype\", void 0)\r\n], Button.prototype, \"_iconChanged\", null);\r\nButton = tslib_1.__decorate([\r\n    p3Decorators.component('zen-button'),\r\n    decorators.bindAttributes\r\n], Button);\r\nexport default Button;\r\n","dts":{"name":"/Users/tristanmatthias/projects/origami/zen/components/Button/Button.d.ts","text":"import { LitElement } from '@polymer/lit-element';\r\nimport { TemplateResult } from 'lit-html';\r\nexport interface ButtonProps {\r\n    size?: string;\r\n    icon?: string | boolean;\r\n    iconright?: boolean;\r\n    hollow?: boolean;\r\n    color?: string;\r\n    disabled?: boolean;\r\n    loading?: boolean;\r\n}\r\n/**\r\n * @class Button\r\n * The button element is a styled button with options of\r\n * adding an icon, loading state, and size.\r\n */\r\nexport default class Button extends LitElement implements ButtonProps {\r\n    size?: string;\r\n    icon?: string | boolean;\r\n    iconright?: boolean;\r\n    hollow?: boolean;\r\n    color?: string;\r\n    disabled?: boolean;\r\n    loading?: boolean;\r\n    private static _boundAttributes;\r\n    private readonly _icon;\r\n    _render({icon, size, hollow}: ButtonProps): TemplateResult;\r\n    private readonly _iconColor;\r\n    private _iconChanged(newV);\r\n}\r\n"}}
