<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="M850,571c-87.9-87.8-230.8-87.8-318.5,0l0,0c-1.4,1.4-2.7,2.8-4.1,4.2c-2.7,2.8-5.2,5.6-7.7,8.5
			c-7.5,8.7-14.1,17.8-20.1,27.3c-7.9,12.6-14.4,25.9-19.6,39.6c-1.3,3.4-2.5,6.9-3.6,10.3c-0.6,1.7-1.1,3.5-1.6,5.2
			c-1,3.5-2,7-2.8,10.5c-0.4,1.8-0.8,3.5-1.2,5.3c-0.8,3.5-1.5,7.1-2.1,10.7c-0.3,1.8-0.6,3.6-0.8,5.4c-0.5,3.6-0.9,7.2-1.3,10.8
			c-0.2,1.8-0.3,3.6-0.5,5.4c-0.3,3.6-0.4,7.2-0.5,10.8c-0.3,12.6,0.5,25.3,2.3,37.8s4.7,24.9,8.6,37c10.6,32.9,28.9,63.8,55,89.9
			c43.9,43.9,101.6,65.9,159.3,65.9s115.3-22,159.3-65.9C937.8,801.7,937.8,658.8,850,571z M796.9,836.4
			c-58.6,58.5-153.8,58.5-212.4,0c-1.1-1.1-2.2-2.2-3.3-3.4c-0.3-0.3-0.6-0.7-0.9-1c-0.8-0.9-1.6-1.7-2.4-2.6
			c-0.3-0.3-0.6-0.6-0.8-1c-1-1.2-2-2.4-3-3.6c0,0,0-0.1-0.1-0.1c-1-1.2-1.9-2.4-2.8-3.6c-0.2-0.3-0.5-0.6-0.7-0.9
			c-0.7-1-1.5-2-2.2-3c-0.2-0.3-0.4-0.5-0.6-0.8c-1.8-2.6-3.5-5.2-5.1-7.8c-0.1-0.2-0.3-0.5-0.4-0.7c-0.7-1.2-1.4-2.4-2.1-3.6
			c-0.1-0.1-0.2-0.3-0.2-0.4c-1.6-2.8-3-5.6-4.4-8.5c-0.1-0.1-0.1-0.3-0.2-0.4c-2.1-4.4-3.9-8.8-5.6-13.3c0,0,0-0.1-0.1-0.1
			c-1.7-4.6-3.1-9.2-4.3-13.9l0,0H836C829.6,793,816.6,816.8,796.9,836.4z M545.4,692.7c1.2-4.7,2.6-9.3,4.3-13.9c0,0,0-0.1,0.1-0.1
			c1.6-4.5,3.5-8.9,5.6-13.3c0.1-0.1,0.1-0.3,0.2-0.4c1.4-2.9,2.9-5.7,4.4-8.5c0.1-0.1,0.2-0.3,0.2-0.4c0.7-1.2,1.4-2.4,2.1-3.6
			c0.1-0.2,0.3-0.5,0.4-0.7c1.6-2.6,3.3-5.3,5.1-7.8c0.2-0.3,0.4-0.5,0.6-0.8c0.7-1,1.5-2,2.2-3c0.2-0.3,0.5-0.6,0.7-0.9
			c0.9-1.2,1.8-2.4,2.8-3.5l0.1-0.1c1-1.2,2-2.4,3-3.6c0.3-0.3,0.6-0.6,0.8-1c0.8-0.9,1.6-1.7,2.4-2.6c0.3-0.3,0.6-0.7,0.9-1
			c1.1-1.1,2.1-2.3,3.2-3.4c29.3-29.3,67.8-43.9,106.2-43.9s76.9,14.6,106.2,43.9c19.7,19.7,32.7,43.5,39.2,68.7H545.4V692.7z" />
    <path d="M377,812.9H189.3V137.2h525.6v195.1c0,20.8,16.8,37.5,37.5,37.5c20.8,0,37.5-16.8,37.5-37.5V137.2
			c0-41.4-33.7-75.1-75.1-75.1H189.3c-41.4,0-75.1,33.7-75.1,75.1v675.7c0,41.4,33.7,75.1,75.1,75.1H377c20.8,0,37.5-16.8,37.5-37.5
			C414.5,829.7,397.7,812.9,377,812.9z" />
    <path d="M301.9,249.8c-20.8,0-37.5,16.8-37.5,37.5c0,20.8,16.8,37.5,37.5,37.5h244c20.8,0,37.5-16.8,37.5-37.5
			c0-20.8-16.8-37.5-37.5-37.5L301.9,249.8L301.9,249.8z" />
    <path d="M395.8,381.2h-93.9c-20.8,0-37.5,16.8-37.5,37.5c0,20.8,16.8,37.5,37.5,37.5h93.9c20.8,0,37.5-16.8,37.5-37.5
			S416.5,381.2,395.8,381.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>