<template>
  <span
    v-bind="$attrs"
    :aria-hidden="title ? null : true"
    :aria-label="title"
    class="material-design-icon nfc-icon"
    role="img"
    @click="$emit('click', $event)"
  >
    <svg
      :fill="fillColor"
      class="material-design-icon__svg"
      :width="size"
      :height="size"
      viewBox="0 0 24 24"
    >
      <path d="M7.24 2C5.6 2 3.96 2 3.55 2.04C2.67 2.09 2.08 2.73 2.04 3.56C2 4.37 2 19.59 2.04 20.41C2.09 21.23 2.71 21.86 3.55 21.91C4.46 21.96 7.44 21.97 8.29 21.97C6.76 20.91 6.55 18.92 6.41 15.23C6.33 13.04 6.4 5.36 6.41 5.04L6.45 2.94L14.5 11V13.5L8.09 7.11C8.08 8.38 8.06 10.03 8.06 11.54C8.06 13 8.08 14.34 8.12 15.05C8.36 19.07 8.74 20.96 10.83 21.7C11.5 21.93 12.07 22 13.07 22C13.89 22 19.63 22 20.45 21.96C21.33 21.91 21.93 21.27 21.97 20.44C22 19.63 22 4.45 21.97 3.62C21.91 2.8 21.29 2.18 20.45 2.13C19.54 2.08 16.57 2.03 15.71 2.03C17.24 3.09 17.44 5.08 17.59 8.78C17.67 10.97 17.6 18.64 17.59 18.97L17.55 21.06L9.53 13V10.5L15.91 16.89C15.92 15.62 15.94 13.97 15.94 12.46C15.94 11 15.92 9.66 15.88 8.96C15.64 4.93 15.26 3.04 13.17 2.3C12.53 2.07 11.93 2 10.93 2H7.24Z">
        <title v-if="title">{{ title }}</title>
      </path>
    </svg>
  </span>
</template>

<script>
export default {
  name: 'NfcIcon',
  props: {
    title: {
      type: String,
      default: null
    },
    fillColor: {
      type: String,
      default: 'currentColor'
    },
    size: {
      type: Number,
      default: 24
    }
  },
  emits: [ 'click' ]
};
</script>