<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="M593.6,515.6c43.4-25.8,72.1-73.3,72.1-127.4c0-81.9-66.8-148.7-148.7-148.7c-81.9,0-148.3,66.8-148.3,148.7
		c0,54.1,29.1,101.6,72.1,127.4c-88.1,31.5-151.1,115.5-151.1,214.2c0,10.2,8.2,18.4,18.4,18.4c10.2,0,18.4-8.2,18.4-18.4
		c0-105.3,85.6-190.5,190.5-190.5S707.5,625,707.5,729.8c0,10.2,8.2,18.4,18.4,18.4c10.2,0,18.4-8.2,18.4-18.4
		C744.8,631.1,681.7,547.2,593.6,515.6L593.6,515.6z M405.6,388.2c0-61.4,50-111.8,111.8-111.8c61.4,0,111.8,50,111.8,111.8
		c0,61.4-50,111.8-111.8,111.8C456,500.1,405.6,449.7,405.6,388.2L405.6,388.2z M405.6,388.2" />
    <path d="M377.8,489v-1.6c0-9-7.4-16.4-16.4-16.4c-34,0-61.4-27.4-61.4-61.4s27.4-61.4,61.4-61.4c9,0,16.4-7.4,16.4-16.4
		c0-9-7.4-16.4-16.4-16.4c-52,0-94.2,42.2-94.2,94.2c0,30.7,14.7,57.8,37.3,75c-49.6,22.1-84.4,71.7-84.4,129.4
		c0,9,7.4,16.4,16.4,16.4c9,0,16.4-7.4,16.4-16.4c0-59.8,48.7-108.5,108.5-108.5C370.4,505.4,377.8,498,377.8,489L377.8,489z
		 M731.7,488.6c22.5-17.2,37.3-44.2,37.3-75c0-52-42.2-94.2-94.2-94.2c-9,0-16.4,7.4-16.4,16.4c0,9,7.4,16.4,16.4,16.4
		c34,0,61.4,27.4,61.4,61.4s-27.4,61.4-61.4,61.4c-9,0-16.4,7.4-16.4,16.4v1.6c0,9,7.4,16.4,16.4,16.4
		c59.8,0,108.5,48.7,108.5,108.5c0,9,7.4,16.4,16.4,16.4c9,0,16.4-7.4,16.4-16.4C816.1,560.3,781.2,510.7,731.7,488.6L731.7,488.6z
		 M731.7,488.6" />
    <path d="M805.8,144.1H220.1c-36,0-65.5,29.5-65.5,65.5v602.1c0,36,29.5,65.5,65.5,65.5h585.7c36,0,65.5-29.5,65.5-65.5V209.2
		C871.4,173.2,841.9,144.1,805.8,144.1L805.8,144.1z M830.4,811.8c0,13.5-11.1,24.6-24.6,24.6H220.1c-13.5,0-24.6-11.1-24.6-24.6
		V209.2c0-13.5,11.1-24.6,24.6-24.6h585.7c13.5,0,24.6,11.1,24.6,24.6V811.8z M830.4,811.8" />
  </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>
