<template>
  <!-- Generator: Adobe Illustrator 24.2.1, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024" :width="`${size}`" :height="`${size}`" :fill="color"
    :style="isLinear ? 'fill:url(#lgid)' : ''">
    <defs v-if="isLinear">
      <linearGradient id="lgid" :x1="gradientPosition[0]" :y1="gradientPosition[1]" :x2="gradientPosition[2]"
        :y2="gradientPosition[3]">
        <stop v-for="(it, i) in linearGradient" :key="i" :offset="it[0]" :style="`stop-color:${it[1]};`" />
      </linearGradient>
    </defs>
    <path d="M921.8,389.8H108.3c-22.5,0-40.7,18.2-40.7,40.7s18.2,40.7,40.7,40.7h813.5c22.5,0,40.7-18.2,40.7-40.7
			S944.2,389.8,921.8,389.8z" />
    <path d="M149,349.1c22.5,0,40.7-18.2,40.7-40.7V145.7c0-22.5-18.2-40.7-40.7-40.7s-40.7,18.2-40.7,40.7v162.7
			C108.3,330.9,126.5,349.1,149,349.1z" />
    <path d="M149,511.7c-22.5,0-40.7,18.2-40.7,40.7v244.1c0,22.5,18.2,40.7,40.7,40.7s40.7-18.2,40.7-40.7V552.4
			C189.6,529.9,171.4,511.7,149,511.7z" />
    <path d="M441.8,349.1c22.5,0,40.7-18.2,40.7-40.7V145.7c0-22.5-18.2-40.7-40.7-40.7s-40.7,18.2-40.7,40.7v162.7
			C401.2,330.9,419.4,349.1,441.8,349.1z" />
    <path d="M441.8,511.8c-22.5,0-40.7,18.2-40.7,40.7v325.4c0,22.5,18.2,40.7,40.7,40.7s40.7-18.2,40.7-40.7V552.5
			C482.5,530,464.3,511.8,441.8,511.8z" />
    <path d="M734.7,349.1c22.5,0,40.7-18.2,40.7-40.7V145.7c0-22.5-18.2-40.7-40.7-40.7S694,123.2,694,145.7v162.7
			C694,330.9,712.2,349.1,734.7,349.1z" />
    <path d="M881.1,349.1c22.5,0,40.7-18.2,40.7-40.7V145.7c0-22.5-18.2-40.7-40.7-40.7s-40.7,18.2-40.7,40.7v162.7
			C840.4,330.9,858.6,349.1,881.1,349.1z" />
    <path d="M734.7,511.8c-22.5,0-40.7,18.2-40.7,40.7v162.7c0,22.5,18.2,40.7,40.7,40.7s40.7-18.2,40.7-40.7V552.5
			C775.4,530,757.1,511.8,734.7,511.8z" />
    <path d="M295.4,349.1c22.5,0,40.7-18.2,40.7-40.7V145.7c0-22.5-18.2-40.7-40.7-40.7s-40.7,18.2-40.7,40.7v162.7
			C254.7,330.9,272.9,349.1,295.4,349.1z" />
    <path d="M295.4,511.8c-22.5,0-40.7,18.2-40.7,40.7v162.7c0,22.5,18.2,40.7,40.7,40.7s40.7-18.2,40.7-40.7V552.5
			C336.1,530,317.9,511.8,295.4,511.8z" />
    <path d="M588.2,349.1c22.5,0,40.7-18.2,40.7-40.7V145.7c0-22.5-18.2-40.7-40.7-40.7s-40.7,18.2-40.7,40.7v162.7
			C547.6,330.9,565.8,349.1,588.2,349.1z" />
    <path d="M588.2,511.8c-22.5,0-40.7,18.2-40.7,40.7v162.7c0,22.5,18.2,40.7,40.7,40.7s40.7-18.2,40.7-40.7V552.5
			C628.9,530,610.7,511.8,588.2,511.8z" />
    <path d="M881.1,511.8c-22.5,0-40.7,18.2-40.7,40.7v244.1c0,22.5,18.2,40.7,40.7,40.7s40.7-18.2,40.7-40.7V552.5
			C921.8,530,903.6,511.8,881.1,511.8z" />
  </svg>
</template>

<script>
import { defaultSize } from "../config"

export default {
  props: {
    size: { type: [String, Number], default: defaultSize },
    color: { type: String, default: '#000' },
    gradientPosition: { type: Array, default: () => ([]) },
    linearGradient: { type: Array, default: () => ([]) },
  },
  computed: {
    isLinear() {
      return (!!this.gradientPosition.length) && (!!this.linearGradient.length)
    }
  }
}
</script>
