<template>
  <span
    v-bind="$attrs"
    :aria-hidden="title ? null : true"
    :aria-label="title"
    class="material-design-icon nix-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="M9.9 8.7L5 17.2L3.9 15.3L5.2 13H2.6L2 12L2.6 11H6.3L7.6 8.7H9.9M10.2 15.5H19.9L18.8 17.4H16.2L17.5 19.7L16.9 20.7H15.8L14 17.4H11.3L10.2 15.5M15.9 11.8L11 3.3H13.2L14.5 5.6L15.8 3.3H16.9L17.5 4.3L15.6 7.5L17 9.8L15.9 11.8M13.8 8.5H4L5.1 6.6H7.7L6.4 4.3L7 3.3H8.1L10 6.5H12.7L13.8 8.5M14.1 15.3L19 6.8L20.1 8.7L18.8 11H21.4L22 12L21.4 13H17.7L16.4 15.3H14.1M8.1 12.2L13 20.6H10.8L9.5 18.3L8.4 20.6H7.1L6.5 19.6L8.4 16.4L7 14.2L8.1 12.2Z">
        <title v-if="title">{{ title }}</title>
      </path>
    </svg>
  </span>
</template>

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