<template>
  <span
    v-bind="$attrs"
    :aria-hidden="title ? null : true"
    :aria-label="title"
    class="material-design-icon aws-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.64,10.38C7.64,10.63 7.66,10.83 7.71,11C7.76,11.12 7.83,11.28 7.92,11.46C7.96,11.5 7.97,11.56 7.97,11.61C7.97,11.68 7.93,11.74 7.84,11.81L7.42,12.09C7.36,12.13 7.3,12.15 7.25,12.15C7.18,12.15 7.12,12.11 7.05,12.05C6.96,11.95 6.88,11.85 6.81,11.74C6.75,11.63 6.68,11.5 6.61,11.35C6.09,11.96 5.44,12.27 4.65,12.27C4.09,12.27 3.65,12.11 3.32,11.79C3,11.47 2.83,11.04 2.83,10.5C2.83,9.95 3.03,9.5 3.43,9.14C3.84,8.8 4.38,8.62 5.06,8.62C5.29,8.62 5.5,8.64 5.77,8.68C6,8.71 6.27,8.76 6.53,8.82V8.34C6.53,7.83 6.43,7.5 6.22,7.27C6,7.06 5.65,6.97 5.14,6.97C4.9,6.97 4.66,7 4.42,7.05C4.17,7.11 3.93,7.18 3.7,7.28C3.59,7.32 3.5,7.35 3.47,7.36C3.42,7.38 3.39,7.38 3.36,7.38C3.27,7.38 3.22,7.32 3.22,7.18V6.85C3.22,6.75 3.23,6.67 3.27,6.62C3.3,6.57 3.36,6.53 3.45,6.5C3.69,6.36 3.96,6.26 4.29,6.18C4.62,6.09 4.96,6.05 5.33,6.05C6.12,6.05 6.7,6.23 7.07,6.59C7.44,6.95 7.62,7.5 7.62,8.23V10.38H7.64M4.94,11.4C5.16,11.4 5.38,11.36 5.62,11.28C5.86,11.2 6.07,11.05 6.25,10.85C6.36,10.72 6.44,10.58 6.5,10.42C6.5,10.26 6.55,10.07 6.55,9.84V9.57C6.35,9.5 6.15,9.5 5.93,9.45C5.72,9.43 5.5,9.41 5.31,9.41C4.86,9.41 4.54,9.5 4.32,9.68C4.1,9.86 4,10.11 4,10.44C4,10.76 4.07,11 4.24,11.15C4.4,11.32 4.63,11.4 4.94,11.4M10.28,12.11C10.16,12.11 10.08,12.09 10,12.05C9.97,12 9.92,11.91 9.88,11.79L8.32,6.65C8.28,6.5 8.26,6.43 8.26,6.38C8.26,6.27 8.31,6.21 8.42,6.21H9.07C9.2,6.21 9.29,6.23 9.33,6.28C9.39,6.32 9.43,6.41 9.47,6.54L10.58,10.94L11.62,6.54C11.65,6.41 11.69,6.32 11.75,6.28C11.8,6.24 11.89,6.21 12,6.21H12.55C12.67,6.21 12.76,6.23 12.81,6.28C12.86,6.32 12.91,6.41 12.94,6.54L14,11L15.14,6.54C15.18,6.41 15.23,6.32 15.27,6.28C15.33,6.24 15.41,6.21 15.53,6.21H16.15C16.26,6.21 16.32,6.27 16.32,6.38C16.32,6.41 16.31,6.45 16.3,6.5C16.3,6.5 16.28,6.58 16.26,6.65L14.65,11.79C14.61,11.93 14.57,12 14.5,12.05C14.46,12.09 14.37,12.12 14.26,12.12H13.69C13.56,12.12 13.5,12.1 13.42,12.05C13.37,12 13.32,11.92 13.3,11.79L12.27,7.5L11.24,11.78C11.21,11.91 11.17,12 11.12,12.05C11.06,12.09 10.97,12.11 10.85,12.11H10.28M18.83,12.29C18.5,12.29 18.13,12.25 17.8,12.17C17.47,12.09 17.21,12 17.04,11.91C16.93,11.85 16.86,11.78 16.83,11.72C16.8,11.66 16.79,11.6 16.79,11.54V11.2C16.79,11.06 16.84,11 16.94,11C17,11 17,11 17.06,11C17.1,11 17.16,11.05 17.23,11.08C17.45,11.18 17.7,11.26 17.96,11.31C18.23,11.36 18.5,11.39 18.75,11.39C19.17,11.39 19.5,11.32 19.72,11.17C19.95,11 20.07,10.81 20.07,10.54C20.07,10.35 20,10.2 19.89,10.07C19.77,9.95 19.54,9.83 19.22,9.73L18.25,9.43C17.77,9.27 17.41,9.05 17.19,8.75C16.97,8.46 16.86,8.13 16.86,7.78C16.86,7.5 16.92,7.26 17.04,7.05C17.16,6.83 17.32,6.65 17.5,6.5C17.72,6.35 17.94,6.24 18.21,6.16C18.47,6.08 18.75,6.04 19.05,6.04C19.19,6.04 19.34,6.05 19.5,6.07C19.64,6.09 19.78,6.12 19.92,6.14C20.06,6.18 20.18,6.21 20.3,6.25C20.42,6.29 20.5,6.33 20.58,6.37C20.67,6.42 20.74,6.47 20.78,6.53C20.82,6.59 20.84,6.66 20.84,6.75V7.07C20.84,7.21 20.79,7.28 20.69,7.28C20.64,7.28 20.55,7.25 20.43,7.2C20.06,7.03 19.63,6.94 19.16,6.94C18.78,6.94 18.5,7 18.27,7.13C18.07,7.25 17.96,7.45 17.96,7.72C17.96,7.91 18.03,8.07 18.16,8.19C18.29,8.32 18.54,8.44 18.89,8.56L19.84,8.86C20.32,9 20.66,9.22 20.87,9.5C21.07,9.77 21.17,10.08 21.17,10.43C21.17,10.71 21.11,10.97 21,11.2C20.88,11.42 20.72,11.62 20.5,11.78C20.31,11.95 20.06,12.07 19.78,12.16C19.5,12.25 19.16,12.29 18.83,12.29M20.08,15.53C17.89,17.14 14.71,18 12,18C8.15,18 4.7,16.58 2.09,14.23C1.88,14.04 2.07,13.79 2.32,13.94C5.14,15.57 8.61,16.56 12.21,16.56C14.64,16.56 17.31,16.06 19.76,15C20.13,14.85 20.44,15.26 20.08,15.53M21,14.5C20.71,14.13 19.14,14.32 18.43,14.4C18.22,14.43 18.19,14.24 18.38,14.1C19.63,13.23 21.69,13.5 21.92,13.77C22.16,14.07 21.86,16.13 20.69,17.11C20.5,17.26 20.33,17.18 20.41,17C20.68,16.32 21.27,14.84 21,14.5Z">
        <title v-if="title">{{ title }}</title>
      </path>
    </svg>
  </span>
</template>

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