<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="M847.3,63.9h-672c-61.8,0-112,50.2-112,112v672c0,61.8,50.2,112,112,112h285.6c24.7,0,44.8-20,44.8-44.8
			s-20.1-44.8-44.8-44.8H175.3c-12.4,0-22.4-10.1-22.4-22.4V176c0-12.3,10-22.4,22.4-22.4h672c12.4,0,22.4,10.1,22.4,22.4v386.4
			c0,24.8,20.1,44.8,44.8,44.8s44.8-20,44.8-44.8V176C959.3,114.2,909.1,63.9,847.3,63.9z" />
    <path d="M914.5,691.2h-295l57.9-57.9c17.5-17.5,17.5-45.9,0-63.4s-45.9-17.5-63.4,0L479.9,704c-1.7,1.7-3.3,3.5-4.7,5.4
			c-0.1,0.1-0.1,0.1-0.2,0.2c-0.4,0.5-0.7,1-1.1,1.6c-0.1,0.1-0.2,0.3-0.3,0.4c-0.3,0.5-0.6,0.9-0.9,1.4c-0.1,0.2-0.2,0.4-0.3,0.6
			c-0.3,0.4-0.5,0.9-0.8,1.4c-0.1,0.2-0.2,0.4-0.3,0.6c-0.2,0.5-0.5,0.9-0.7,1.4c-0.1,0.2-0.2,0.4-0.3,0.6c-0.2,0.5-0.4,1-0.6,1.5
			c-0.1,0.2-0.1,0.3-0.2,0.5c-0.2,0.5-0.4,1-0.6,1.5c-0.1,0.2-0.1,0.3-0.2,0.5c-0.2,0.5-0.4,1.1-0.5,1.6c0,0.2-0.1,0.3-0.1,0.5
			c-0.2,0.5-0.3,1.1-0.4,1.6c0,0.2-0.1,0.3-0.1,0.5c-0.1,0.5-0.3,1.1-0.4,1.6c0,0.2-0.1,0.4-0.1,0.5c-0.1,0.5-0.2,1.1-0.3,1.6
			c0,0.2-0.1,0.5-0.1,0.7c-0.1,0.5-0.1,1-0.2,1.4c0,0.4-0.1,0.7-0.1,1.1c0,0.4-0.1,0.7-0.1,1.1c-0.1,1.5-0.1,3,0,4.4
			c0,0.4,0.1,0.7,0.1,1.1c0,0.4,0,0.7,0.1,1.1c0,0.5,0.1,1,0.2,1.4c0,0.2,0.1,0.5,0.1,0.7c0.1,0.5,0.2,1.1,0.3,1.6
			c0,0.2,0.1,0.4,0.1,0.5c0.1,0.6,0.2,1.1,0.4,1.6c0,0.2,0.1,0.3,0.1,0.5c0.1,0.6,0.3,1.1,0.4,1.6c0,0.2,0.1,0.3,0.1,0.5
			c0.2,0.5,0.3,1.1,0.5,1.6c0.1,0.2,0.1,0.3,0.2,0.5c0.2,0.5,0.4,1,0.6,1.5c0.1,0.2,0.1,0.3,0.2,0.5c0.2,0.5,0.4,1,0.6,1.5
			c0.1,0.2,0.2,0.4,0.3,0.6c0.2,0.5,0.5,0.9,0.7,1.4c0.1,0.2,0.2,0.4,0.3,0.6c0.2,0.5,0.5,0.9,0.8,1.4c0.1,0.2,0.2,0.4,0.3,0.6
			c0.3,0.5,0.6,0.9,0.9,1.4c0.1,0.1,0.2,0.3,0.3,0.4c0.4,0.5,0.7,1,1.1,1.6c0.1,0.1,0.1,0.1,0.2,0.2c1.4,1.9,3,3.8,4.7,5.4
			L614,902.1c8.8,8.8,20.2,13.1,31.7,13.1s22.9-4.4,31.7-13.1c17.5-17.5,17.5-45.9,0-63.4l-57.9-57.9h295.1
			c24.7,0,44.8-20,44.8-44.8S939.3,691.2,914.5,691.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>
