<template>
  <span v-bind="$attrs"
        :aria-hidden="!title ? true : null"
        :aria-label="title ? true : null"
        class="material-design-icon home-flood-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.67 19C16.72 19 16.58 20 15.34 20C14.15 20 13.92 19 12 19C10.06 19 9.91 20 8.67 20S7.29 19 5.34 19 3.24 20 2 20V22C3.95 22 4.11 21 5.34 21C6.58 21 6.72 22 8.67 22S10.77 21 12 21C13.23 21 13.41 22 15.34 22S17.44 21 18.67 21C19.89 21 20.07 22 22 22V20C20.76 20 20.62 19 18.67 19M8.68 17.5C10.63 17.5 10.77 16.5 12 16.5C13.2 16.5 13.43 17.5 15.34 17.5C17.29 17.5 17.43 16.5 18.67 16.5C19.86 16.5 20.07 17.5 22 17.5V15.5C21.35 15.5 21 15.22 20.5 14.95L18.5 7.42L20.57 8.27L21.31 6.41L9.78 2L2 11.61L3.57 12.84L4.96 11.06L5.89 14.54C5.71 14.5 5.54 14.5 5.33 14.5C3.38 14.5 3.24 15.5 2 15.5V17.5C3.9 17.5 4.17 16.5 5.35 16.5C6.54 16.5 6.77 17.5 8.68 17.5M14.04 10.18L15.46 15.5C14.12 15.58 14 14.5 12 14.5C11.63 14.5 11.34 14.54 11.08 14.6L10.17 11.21L14.04 10.18Z">
        <title v-if="title">{{ title }}</title>
      </path>
    </svg>
  </span>
</template>

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