text: define(["../iron-flex-layout/iron-flex-layout.js", "../iron-meta/iron-meta.js", "../polymer/lib/legacy/polymer-fn.js", "../polymer/lib/legacy/polymer.dom.js", "../polymer/lib/utils/html-tag.js", "../polymer/polymer-legacy.js"], function (_ironFlexLayout, _ironMeta, _polymerFn, _polymerDom, _htmlTag, _polymerLegacy) {
    "use strict";
  
    var _templateObject_5f6a09a0af6311ebbe560fe9c4727db1;
  
    /**
    
    The `iron-icon` element displays an icon. By default an icon renders as a 24px
    square.
    
    Example using src:
    
        <iron-icon src="star.png"></iron-icon>
    
    Example setting size to 32px x 32px:
    
        <iron-icon class="big" src="big_star.png"></iron-icon>
    
        <style is="custom-style">
          .big {
            --iron-icon-height: 32px;
            --iron-icon-width: 32px;
          }
        </style>
    
    The iron elements include several sets of icons. To use the default set of
    icons, import `iron-icons.js` and use the `icon` attribute to specify an icon:
    
        <script type="module">
          import "@polymer/iron-icons/iron-icons.js";
        </script>
    
        <iron-icon icon="menu"></iron-icon>
    
    To use a different built-in set of icons, import the specific
    `iron-icons/<iconset>-icons.js`, and specify the icon as `<iconset>:<icon>`.
    For example, to use a communication icon, you would use:
    
        <script type="module">
          import "@polymer/iron-icons/communication-icons.js";
        </script>
    
        <iron-icon icon="communication:email"></iron-icon>
    
    You can also create custom icon sets of bitmap or SVG icons.
    
    Example of using an icon named `cherry` from a custom iconset with the ID
    `fruit`:
    
        <iron-icon icon="fruit:cherry"></iron-icon>
    
    See `<iron-iconset>` and `<iron-iconset-svg>` for more information about how to
    create a custom iconset.
    
    See the `iron-icons` demo to see the icons available in the various iconsets.
    
    ### Styling
    
    The following custom properties are available for styling:
    
    Custom property | Description | Default
    ----------------|-------------|----------
    `--iron-icon` | Mixin applied to the icon | {}
    `--iron-icon-width` | Width of the icon | `24px`
    `--iron-icon-height` | Height of the icon | `24px`
    `--iron-icon-fill-color` | Fill color of the svg icon | `currentcolor`
    `--iron-icon-stroke-color` | Stroke color of the svg icon | none
    
    @group Iron Elements
    @element iron-icon
    @demo demo/index.html
    @hero hero.svg
    @homepage polymer.github.io
    */
    (0, _polymerFn.Polymer)({
      _template: (0, _htmlTag.html)(_templateObject_5f6a09a0af6311ebbe560fe9c4727db1 || (_templateObject_5f6a09a0af6311ebbe560fe9c4727db1 = babelHelpers.taggedTemplateLiteral(["\n    <style>\n      :host {\n        @apply --layout-inline;\n        @apply --layout-center-center;\n        position: relative;\n\n        vertical-align: middle;\n\n        fill: var(--iron-icon-fill-color, currentcolor);\n        stroke: var(--iron-icon-stroke-color, none);\n\n        width: var(--iron-icon-width, 24px);\n        height: var(--iron-icon-height, 24px);\n        @apply --iron-icon;\n      }\n\n      :host([hidden]) {\n        display: none;\n      }\n    </style>\n"]))),
      is: 'iron-icon',
      properties: {
        /**
         * The name of the icon to use. The name should be of the form:
         * `iconset_name:icon_name`.
         */
        icon: {
          type: String
        },
  
        /**
         * The name of the theme to used, if one is specified by the
         * iconset.
         */
        theme: {
          type: String
        },
  
        /**
         * If using iron-icon without an iconset, you can set the src to be
         * the URL of an individual icon image file. Note that this will take
         * precedence over a given icon attribute.
         */
        src: {
          type: String
        },
  
        /**
         * @type {!IronMeta}
         */
        _meta: {
          value: _polymerLegacy.Base.create('iron-meta', {
            type: 'iconset'
          })
        }
      },
      observers: ['_updateIcon(_meta, isAttached)', '_updateIcon(theme, isAttached)', '_srcChanged(src, isAttached)', '_iconChanged(icon, isAttached)'],
      _DEFAULT_ICONSET: 'icons',
      _iconChanged: function _iconChanged(icon) {
        var parts = (icon || '').split(':');
        this._iconName = parts.pop();
        this._iconsetName = parts.pop() || this._DEFAULT_ICONSET;
  
        this._updateIcon();
      },
      _srcChanged: function _srcChanged(src) {
        this._updateIcon();
      },
      _usesIconset: function _usesIconset() {
        return this.icon || !this.src;
      },
  
      /** @suppress {visibility} */
      _updateIcon: function _updateIcon() {
        if (this._usesIconset()) {
          if (this._img && this._img.parentNode) {
            (0, _polymerDom.dom)(this.root).removeChild(this._img);
          }
  
          if (this._iconName === '') {
            if (this._iconset) {
              this._iconset.removeIcon(this);
            }
          } else if (this._iconsetName && this._meta) {
            this._iconset =
            /** @type {?Polymer.Iconset} */
            this._meta.byKey(this._iconsetName);
  
            if (this._iconset) {
              this._iconset.applyIcon(this, this._iconName, this.theme);
  
              this.unlisten(window, 'iron-iconset-added', '_updateIcon');
            } else {
              this.listen(window, 'iron-iconset-added', '_updateIcon');
            }
          }
        } else {
          if (this._iconset) {
            this._iconset.removeIcon(this);
          }
  
          if (!this._img) {
            this._img = document.createElement('img');
            this._img.style.width = '100%';
            this._img.style.height = '100%';
            this._img.draggable = false;
          }
  
          this._img.src = this.src;
          (0, _polymerDom.dom)(this.root).appendChild(this._img);
        }
      }
    });
  });