<template>
  <span
    v-bind="$attrs"
    :aria-hidden="title ? null : true"
    :aria-label="title"
    class="material-design-icon cookie-alert-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="M18 10H16V9C16 8 15 8 15 8H13V7C13 6 12 6 12 6H11V4C11 3 10 3 10 3C5 3 1 7 1 12S5 21 10 21 19 17 19 12C19 11.5 19 11 18.9 10.5C18.6 10 18 10 18 10M4.5 13C3.7 13 3 12.3 3 11.5S3.7 10 4.5 10 6 10.7 6 11.5 5.3 13 4.5 13M6 7.5C6 6.7 6.7 6 7.5 6S9 6.7 9 7.5 8.3 9 7.5 9 6 8.3 6 7.5M9 19C8.2 19 7.5 18.3 7.5 17.5S8.2 16 9 16 10.5 16.7 10.5 17.5 9.8 19 9 19M9.5 14C8.7 14 8 13.3 8 12.5S8.7 11 9.5 11 11 11.7 11 12.5 10.3 14 9.5 14M14.5 16C13.7 16 13 15.3 13 14.5S13.7 13 14.5 13C15.3 13 16 13.7 16 14.5S15.3 16 14.5 16M21 15H23V17H21V15M23 7V13H21V7H23Z">
        <title v-if="title">{{ title }}</title>
      </path>
    </svg>
  </span>
</template>

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