/**
@license
Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at
http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
part of the polymer project is also subject to an additional IP rights grant
found at http://polymer.github.io/PATENTS.txt
*/
import"../polymer/polymer-legacy.js";import{PaperRippleBehavior as e}from"../paper-behaviors/paper-ripple-behavior.js";import{Polymer as i}from"../polymer/lib/legacy/polymer-fn.js";import{html as t}from"../polymer/lib/utils/html-tag.js";import{afterNextRender as r}from"../polymer/lib/utils/render-status.js";i({is:"paper-icon-button-light",_template:t`
    <style>
      :host {
        display: inline-block;
        position: relative;
        width: 24px;
        height: 24px;
      }

      paper-ripple {
        opacity: 0.6;
        color: currentColor;
        @apply --paper-icon-button-light-ripple;
      }

      :host > ::slotted(button) {
        position: relative;
        width: 100%;
        height: 100%;
        margin: 0;
        padding: 0;
        background: none;
        border: none;
        outline: none;
        vertical-align: middle;
        color: inherit;
        cursor: pointer;
        /* NOTE: Both values are needed, since some phones require the value to be \`transparent\`. */
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
        -webkit-tap-highlight-color: transparent;
      }
      :host > ::slotted(button[disabled]) {
        color: #9b9b9b;
        pointer-events: none;
        cursor: auto;
      }
    </style>
    <slot></slot>
  `,behaviors:[e],registered:function(){this._template.setAttribute("strip-whitespace","")},ready:function(){r(this,(()=>{this.addEventListener("down",this._rippleDown.bind(this)),this.addEventListener("up",this._rippleUp.bind(this));var e=this.getEffectiveChildren()[0];this._rippleContainer=e,e.addEventListener("focus",this._rippleDown.bind(this)),e.addEventListener("blur",this._rippleUp.bind(this))}))},_rippleDown:function(){this.getRipple().uiDownAction()},_rippleUp:function(){this.getRipple().uiUpAction()},ensureRipple:function(i){var t=this._ripple;e.ensureRipple.apply(this,arguments),this._ripple&&this._ripple!==t&&(this._ripple.center=!0,this._ripple.classList.add("circle"))}});