import { r as registerInstance, h, g as getElement } from './index-0b18a276.js';
import './component-e22d7bf7.js';
import './ponyfill-f805c928.js';
import { M as MDCRipple } from './component-9e8e8eaa.js';
var Fab = /** @class */ (function () {
    function Fab(hostRef) {
        registerInstance(this, hostRef);
        /**
         * Optional, specifies the FAB size
         */
        this.size = 'medium';
        /**
         * Optional, animates the FAB out of view.
         *
         * When set to false, the FAB will return to view.
         */
        this.hidden = false;
    }
    Fab.prototype.componentWillLoad = function () {
        if (!this.icon && !this.label) {
            throw '[materials][FAB] You should define at least a label or an icon';
        }
    };
    Fab.prototype.componentDidLoad = function () {
        MDCRipple.attachTo(this.host.shadowRoot.querySelector('.mdc-fab'));
    };
    Fab.prototype.renderIcon = function () {
        return this.icon ? (h("materials-icon", { name: this.icon })) : null;
    };
    Fab.prototype.render = function () {
        return (h("button", { class: { 'mdc-fab': true, 'mdc-fab--extended': !!this.label, 'mdc-fab--mini': this.size === 'small', 'mdc-fab--exited': this.hidden } }, this.icon && h("span", { class: "mdc-fab__icon material-icons" }, this.renderIcon()), this.label && h("span", { class: "mdc-fab__label" }, this.label)));
    };
    Object.defineProperty(Fab.prototype, "host", {
        get: function () { return getElement(this); },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Fab, "style", {
        get: function () { return ".mdc-fab{-webkit-box-shadow:0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12);box-shadow:0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12);display:-ms-inline-flexbox;display:inline-flex;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-box-sizing:border-box;box-sizing:border-box;width:56px;height:56px;padding:0;border:none;fill:currentColor;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-moz-appearance:none;-webkit-appearance:none;overflow:hidden;-webkit-transition:opacity 15ms linear 30ms,-webkit-box-shadow 280ms cubic-bezier(0.4,0,0.2,1),-webkit-transform 270ms 0ms cubic-bezier(0,0,0.2,1);transition:opacity 15ms linear 30ms,-webkit-box-shadow 280ms cubic-bezier(0.4,0,0.2,1),-webkit-transform 270ms 0ms cubic-bezier(0,0,0.2,1);transition:box-shadow 280ms cubic-bezier(0.4,0,0.2,1),opacity 15ms linear 30ms,transform 270ms 0ms cubic-bezier(0,0,0.2,1);transition:box-shadow 280ms cubic-bezier(0.4,0,0.2,1),opacity 15ms linear 30ms,transform 270ms 0ms cubic-bezier(0,0,0.2,1),-webkit-box-shadow 280ms cubic-bezier(0.4,0,0.2,1),-webkit-transform 270ms 0ms cubic-bezier(0,0,0.2,1);background-color:#018786;color:#fff;color:var(--mdc-theme-on-secondary,#fff);}.mdc-fab:not(.mdc-fab--extended){border-radius:50%;}.mdc-fab::-moz-focus-inner{padding:0;border:0;}.mdc-fab:hover,.mdc-fab:focus{-webkit-box-shadow:0px 5px 5px -3px rgba(0,0,0,0.2),0px 8px 10px 1px rgba(0,0,0,0.14),0px 3px 14px 2px rgba(0,0,0,0.12);box-shadow:0px 5px 5px -3px rgba(0,0,0,0.2),0px 8px 10px 1px rgba(0,0,0,0.14),0px 3px 14px 2px rgba(0,0,0,0.12);}.mdc-fab:active{-webkit-box-shadow:0px 7px 8px -4px rgba(0,0,0,0.2),0px 12px 17px 2px rgba(0,0,0,0.14),0px 5px 22px 4px rgba(0,0,0,0.12);box-shadow:0px 7px 8px -4px rgba(0,0,0,0.2),0px 12px 17px 2px rgba(0,0,0,0.14),0px 5px 22px 4px rgba(0,0,0,0.12);}.mdc-fab:active,.mdc-fab:focus{outline:none;}.mdc-fab:hover{cursor:pointer;}.mdc-fab > svg{width:100%;}\@supports not (-ms-ime-align:auto){.mdc-fab{background-color:var(--mdc-theme-secondary,#018786);}}.mdc-fab .mdc-fab__icon{width:24px;height:24px;font-size:24px;}.mdc-fab--mini{width:40px;height:40px;}.mdc-fab--extended{font-family:Roboto,sans-serif;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-size:0.875rem;line-height:2.25rem;font-weight:500;letter-spacing:0.0892857143em;text-decoration:none;text-transform:uppercase;border-radius:24px;padding:0 20px;width:auto;max-width:100%;height:48px;}.mdc-fab--extended .mdc-fab__icon{margin-left:-8px;margin-right:12px;}[dir=rtl] .mdc-fab--extended .mdc-fab__icon,.mdc-fab--extended .mdc-fab__icon[dir=rtl]{margin-left:12px;margin-right:-8px;}.mdc-fab--extended .mdc-fab__label+.mdc-fab__icon{margin-left:12px;margin-right:-8px;}[dir=rtl] .mdc-fab--extended .mdc-fab__label+.mdc-fab__icon,.mdc-fab--extended .mdc-fab__label+.mdc-fab__icon[dir=rtl]{margin-left:-8px;margin-right:12px;}.mdc-fab__label{-ms-flex-pack:start;justify-content:flex-start;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;}.mdc-fab__icon{-webkit-transition:-webkit-transform 180ms 90ms cubic-bezier(0,0,0.2,1);transition:-webkit-transform 180ms 90ms cubic-bezier(0,0,0.2,1);transition:transform 180ms 90ms cubic-bezier(0,0,0.2,1);transition:transform 180ms 90ms cubic-bezier(0,0,0.2,1),-webkit-transform 180ms 90ms cubic-bezier(0,0,0.2,1);fill:currentColor;will-change:transform;}.mdc-fab .mdc-fab__icon{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;}.mdc-fab--exited{-webkit-transform:scale(0);transform:scale(0);opacity:0;-webkit-transition:opacity 15ms linear 150ms,-webkit-transform 180ms 0ms cubic-bezier(0.4,0,1,1);transition:opacity 15ms linear 150ms,-webkit-transform 180ms 0ms cubic-bezier(0.4,0,1,1);transition:opacity 15ms linear 150ms,transform 180ms 0ms cubic-bezier(0.4,0,1,1);transition:opacity 15ms linear 150ms,transform 180ms 0ms cubic-bezier(0.4,0,1,1),-webkit-transform 180ms 0ms cubic-bezier(0.4,0,1,1);}.mdc-fab--exited .mdc-fab__icon{-webkit-transform:scale(0);transform:scale(0);-webkit-transition:-webkit-transform 135ms 0ms cubic-bezier(0.4,0,1,1);transition:-webkit-transform 135ms 0ms cubic-bezier(0.4,0,1,1);transition:transform 135ms 0ms cubic-bezier(0.4,0,1,1);transition:transform 135ms 0ms cubic-bezier(0.4,0,1,1),-webkit-transform 135ms 0ms cubic-bezier(0.4,0,1,1);}\@-webkit-keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));}}\@keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));}}\@-webkit-keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0;}to{opacity:var(--mdc-ripple-fg-opacity,0);}}\@keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0;}to{opacity:var(--mdc-ripple-fg-opacity,0);}}\@-webkit-keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity,0);}to{opacity:0;}}\@keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity,0);}to{opacity:0;}}.mdc-ripple-surface--test-edge-var-bug{--mdc-ripple-surface-test-edge-var:1px solid #000;visibility:hidden;}.mdc-ripple-surface--test-edge-var-bug::before{border:var(--mdc-ripple-surface-test-edge-var);}.mdc-fab{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:rgba(0,0,0,0);}.mdc-fab::before,.mdc-fab::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:\"\";}.mdc-fab::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;}.mdc-fab.mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1));}.mdc-fab.mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center;}.mdc-fab.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0);}.mdc-fab.mdc-ripple-upgraded--foreground-activation::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;}.mdc-fab.mdc-ripple-upgraded--foreground-deactivation::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));}.mdc-fab::before,.mdc-fab::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%;}.mdc-fab.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%);}.mdc-fab::before,.mdc-fab::after{background-color:#fff;}\@supports not (-ms-ime-align:auto){.mdc-fab::before,.mdc-fab::after{background-color:var(--mdc-theme-on-secondary,#fff);}}.mdc-fab:hover::before{opacity:0.08;}.mdc-fab:not(.mdc-ripple-upgraded):focus::before,.mdc-fab.mdc-ripple-upgraded--background-focused::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:0.24;}.mdc-fab:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear;}.mdc-fab:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:0.24;}.mdc-fab.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:0.24;}"; },
        enumerable: true,
        configurable: true
    });
    return Fab;
}());
export { Fab as materials_fab };
