<!--
Copyright (C) 2016 The Android Open Source Project

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<link rel="import" href="../bower_components/polymer/polymer.html">
<link rel="import" href="gr-avatar.html">

<dom-module id="gr-account-label">
  <template>
    <style>
      :host {
        display: inline;
      }
      gr-avatar {
        height: 1.3em;
        width: 1.3em;
        vertical-align: -.3em;
      }
      .text:hover {
        @apply(--gr-account-label-text-hover-style);
      }
    </style>
    <span title$="[[_computeAccountTitle(account)]]">
      <gr-avatar account="[[account]]"
          image-size="[[avatarImageSize]]"></gr-avatar>
      <span class="text">
        <span>[[account.name]]</span>
        <span hidden$="[[!_computeShowEmail(showEmail, account)]]">
          ([[account.email]])
        </span>
      </span>
    </span>
  </template>
  <script>
  (function() {
    'use strict';

    Polymer({
      is: 'gr-account-label',

      properties: {
        account: Object,
        avatarImageSize: {
          type: Number,
          value: 32,
        },
        showEmail: {
          type: Boolean,
          value: false,
        },
      },

      _computeAccountTitle: function(account) {
        if (!account || !account.name) { return; }
        var result = util.escapeHTML(account.name);
        if (account.email) {
          result += ' <' + util.escapeHTML(account.email) + '>';
        }
        return result;
      },

      _computeShowEmail: function(showEmail, account) {
        return !!(showEmail && account && account.email);
      },

    });
  })();
  </script>
</dom-module>
