<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 class="st1" d="M916,342.9c-22-51.9-53.4-98.5-93.3-138.3c-39.9-39.9-86.4-71.2-138.3-93.3C630.8,88.6,573.8,77.1,515,77.1
			s-115.8,11.5-169.4,34.2c-51.9,22-98.5,53.4-138.3,93.3c-39.9,39.8-71.2,86.4-93.3,138.3c-22.7,53.6-34.2,110.6-34.2,169.4
			S91.3,628.1,114,681.7c22,51.9,53.4,98.5,93.3,138.3c39.8,39.9,86.4,71.2,138.3,93.3c53.6,22.7,110.6,34.2,169.4,34.2
			s115.8-11.5,169.4-34.2c51.9-22,98.5-53.4,138.4-93.3c39.8-39.8,71.2-86.4,93.2-138.3c22.7-53.7,34.2-110.7,34.2-169.4
			S938.7,396.6,916,342.9z M866.1,660.6c-19.1,45.3-46.6,86-81.6,121.1c-35.1,35-75.9,62.5-121.1,81.7c-47,19.9-96.9,30-148.3,30
			s-101.2-10-148.3-29.9c-45.2-19.1-86-46.5-121.1-81.7S183,705.9,164,660.7c-19.9-47-30-96.8-30-148.3c0-51.3,10-101.2,29.8-148.3
			c19.1-45.2,46.5-86,81.6-121.1s75.9-62.6,121.1-81.7c47-19.9,96.9-30,148.3-30s101.2,10,148.3,29.9c45.2,19.1,86,46.5,121.1,81.7
			C819.5,278,846.9,318.8,866,364c19.9,47,30,96.8,30,148.3C895.9,563.7,885.9,613.5,866.1,660.6z" />
    <path class="st2" d="M922.6,340.1c-22.4-52.8-54.3-100.1-94.8-140.6s-87.8-72.4-140.6-94.8C632.7,81.7,574.8,70,515,70
			c-59.7,0-117.7,11.7-172.2,34.8c-52.8,22.4-100.1,54.3-140.6,94.8s-72.4,87.8-94.8,140.6c-23.1,54.5-34.7,112.4-34.7,172.2
			S84.4,630,107.5,684.5c22.4,52.8,54.3,100.1,94.8,140.6s87.8,72.4,140.6,94.8c54.5,23.1,112.4,34.8,172.2,34.8
			s117.7-11.7,172.2-34.8c52.8-22.4,100.1-54.3,140.6-94.8s72.4-87.8,94.8-140.6c23.1-54.5,34.7-112.5,34.7-172.2
			S945.7,394.7,922.6,340.1z M916,681.7c-22,51.9-53.4,98.5-93.2,138.3c-39.9,39.9-86.5,71.2-138.4,93.3
			C630.8,936,573.8,947.5,515,947.5S399.2,936,345.6,913.3c-51.9-22-98.5-53.4-138.3-93.3c-39.9-39.8-71.2-86.4-93.3-138.3
			c-22.7-53.6-34.2-110.6-34.2-169.4S91.3,396.5,114,342.9c22-51.9,53.4-98.5,93.3-138.3c39.9-39.9,86.4-71.2,138.3-93.3
			C399.2,88.6,456.2,77.1,515,77.1s115.8,11.5,169.4,34.2c51.9,22,98.4,53.4,138.3,93.3C862.6,244.4,894,291,916,342.9
			c22.7,53.7,34.2,110.7,34.2,169.4S938.7,628.1,916,681.7z" />
    <path class="st2" d="M784.3,242.9c-35.1-35.1-75.9-62.6-121.1-81.7c-47-19.8-96.9-29.9-148.3-29.9s-101.3,10.1-148.3,30
			c-45.3,19.1-86,46.5-121.1,81.7c-35.1,35.1-62.6,75.9-81.6,121.1c-19.8,47.1-29.8,96.9-29.8,148.3s10.1,101.3,30,148.3
			c19.1,45.2,46.5,86,81.6,121.1s75.9,62.6,121.1,81.7c47,19.8,96.9,29.9,148.3,29.9s101.3-10.1,148.3-30
			c45.3-19.2,86-46.6,121.1-81.7c35.1-35.1,62.6-75.8,81.6-121.1c19.8-47.1,29.8-96.9,29.8-148.3S885.8,411,865.9,364
			C846.9,318.8,819.5,278,784.3,242.9z M859.5,657.8c-18.7,44.4-45.7,84.4-80.1,118.8C744.9,811,705,838,660.6,856.8
			c-46.1,19.5-95,29.4-145.5,29.4c-50.4,0-99.4-9.9-145.5-29.3c-44.4-18.7-84.4-45.7-118.8-80.1c-34.5-34.5-61.4-74.5-80.1-118.8
			c-19.5-46.1-29.4-95-29.4-145.5c0-50.4,9.8-99.4,29.3-145.5c18.7-44.4,45.7-84.4,80.1-118.8s74.4-61.4,118.9-80.1
			c46.1-19.5,95-29.4,145.5-29.4c50.4,0,99.4,9.9,145.5,29.3c44.4,18.7,84.4,45.7,118.8,80.1c34.5,34.5,61.4,74.5,80.1,118.8
			c19.5,46.1,29.4,95,29.4,145.5C888.8,562.7,879,611.7,859.5,657.8z" />
    <path class="st1"
      d="M622.5,333.8H407.6c-39.2,0-71.1,31.9-71.1,71.1v214.8c0,39.2,31.9,71.1,71.1,71.1h214.8
			c39.2,0,71.1-31.9,71.1-71.1V404.9c0.1-18.9-7.3-36.7-20.7-50.2C659.3,341.2,641.4,333.8,622.5,333.8z M638.4,619.7
			c0,8.8-7.1,15.9-15.9,15.9H407.6c-8.8,0-15.9-7.1-15.9-15.9V404.9c0-8.8,7.1-15.9,15.9-15.9h214.8c8.8,0,16,7.1,16,15.9V619.7z" />
    <path class="st2" d="M622.5,326.7H407.6c-43.1,0-78.2,35.1-78.2,78.2v214.8c0,43.1,35.1,78.2,78.2,78.2h214.8
			c43.1,0,78.2-35.1,78.2-78.2V404.9c0.1-20.8-8-40.4-22.8-55.2C663,334.8,643.3,326.7,622.5,326.7z M693.4,619.7
			c0,39.2-31.9,71.1-71.1,71.1H407.6c-39.2,0-71.1-31.9-71.1-71.1V404.9c0-39.2,31.9-71.1,71.1-71.1h214.9c19,0,36.8,7.4,50.2,20.9
			c13.4,13.4,20.8,31.3,20.7,50.2V619.7z" />
    <path class="st2" d="M622.4,389H407.6c-8.8,0-15.9,7.1-15.9,15.9v214.8c0,8.8,7.1,15.9,15.9,15.9h214.9c8.8,0,15.9-7.1,15.9-15.9
			V404.9C638.4,396.1,631.2,389,622.4,389z M631.2,619.7c0,4.8-4,8.8-8.8,8.8H407.6c-4.8,0-8.8-4-8.8-8.8V404.9c0-4.8,4-8.8,8.8-8.8
			h214.8c4.9,0,8.9,3.9,8.9,8.8v214.8H631.2z" />
  </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>
