<template>
  <span
    v-bind="$attrs"
    :aria-hidden="title ? null : true"
    :aria-label="title"
    class="material-design-icon billiards-rack-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.31,16.44L14.54,6.47C13.72,5.04 11.89,4.55 10.46,5.38C10,5.64 9.63,6 9.36,6.47L3.6,16.44C2.77,17.87 3.26,19.69 4.69,20.5C5.14,20.78 5.65,20.92 6.18,20.92H17.73C19.38,20.91 20.72,19.57 20.71,17.92C20.71,17.4 20.57,16.89 20.31,16.44M5.37,17.43L11.11,7.47C11.38,7 12,6.82 12.46,7.1C12.62,7.18 12.75,7.31 12.84,7.47L18.58,17.43C18.85,17.91 18.69,18.5 18.21,18.79C18.06,18.88 17.89,18.93 17.72,18.93H6.21C5.66,18.92 5.21,18.47 5.22,17.92C5.22,17.75 5.26,17.58 5.35,17.43H5.37M11.97,13.45C10.87,13.45 10,12.56 10,11.46C10,10.35 10.87,9.46 11.97,9.46A2,2 0 0,1 13.97,11.46C13.97,12.56 13.07,13.45 11.95,13.45H11.97M9.46,17.93C8.36,17.93 7.47,17.04 7.47,15.94C7.47,14.84 8.36,13.95 9.46,13.95C10.56,13.95 11.46,14.84 11.46,15.94C11.46,17.04 10.56,17.93 9.46,17.93M14.44,17.93A2,2 0 0,1 12.45,15.94A2,2 0 0,1 14.44,13.95C15.54,13.95 16.44,14.84 16.44,15.94C16.44,17.04 15.54,17.93 14.44,17.93Z">
        <title v-if="title">{{ title }}</title>
      </path>
    </svg>
  </span>
</template>

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