<template>
  <span v-bind="$attrs"
        :aria-hidden="!title ? true : null"
        :aria-label="title ? true : null"
        class="material-design-icon cookie-settings-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="M20.87 9.5C20.6 9 20 9 20 9H18V8C18 7 17 7 17 7H15V6C15 5 14 5 14 5H13V3C13 2 12 2 12 2C7.03 2 3 6.03 3 11S7.03 20 12 20 21 15.97 21 11C21 10.5 20.96 10 20.87 9.5M6.5 12C5.67 12 5 11.33 5 10.5S5.67 9 6.5 9 8 9.67 8 10.5 7.33 12 6.5 12M8 6.5C8 5.67 8.67 5 9.5 5S11 5.67 11 6.5 10.33 8 9.5 8 8 7.33 8 6.5M11 18C10.17 18 9.5 17.33 9.5 16.5S10.17 15 11 15 12.5 15.67 12.5 16.5 11.83 18 11 18M11.5 13C10.67 13 10 12.33 10 11.5S10.67 10 11.5 10 13 10.67 13 11.5 12.33 13 11.5 13M16.5 15C15.67 15 15 14.33 15 13.5S15.67 12 16.5 12 18 12.67 18 13.5 17.33 15 16.5 15M7 22H9V24H7V22M11 22H13V24H11V22M15 22H17V24H15V22Z">
        <title v-if="title">{{ title }}</title>
      </path>
    </svg>
  </span>
</template>

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