<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="M857.1,779.4c-15-15-39.2-15-54.2,0L753.4,829V576.7c0-21.2-17.1-38.3-38.3-38.3s-38.3,17.1-38.3,38.3V829l-49.5-49.5
			c-15-15-39.2-15-54.2,0s-15,39.2,0,54.2l114.7,114.7c1,1,2,1.9,3.1,2.8l0,0c1,0.8,2,1.5,3,2.2c0.3,0.2,0.5,0.3,0.8,0.5
			c0.8,0.5,1.6,1,2.4,1.4c0.4,0.2,0.8,0.4,1.1,0.5c0.7,0.4,1.5,0.7,2.2,1c0.4,0.2,0.8,0.3,1.3,0.5c0.7,0.3,1.5,0.6,2.2,0.8
			c0.5,0.1,1,0.2,1.4,0.4c0.7,0.2,1.4,0.4,2.2,0.5c0.6,0.1,1.2,0.2,1.8,0.3s1.2,0.2,1.8,0.3c1.3,0.1,2.5,0.2,3.8,0.2
			s2.5-0.1,3.8-0.2c0.6-0.1,1.2-0.2,1.8-0.3s1.2-0.2,1.8-0.3c0.7-0.1,1.5-0.3,2.2-0.5c0.5-0.1,1-0.2,1.4-0.4
			c0.8-0.2,1.5-0.5,2.2-0.8c0.4-0.2,0.9-0.3,1.3-0.5c0.8-0.3,1.5-0.7,2.2-1c0.4-0.2,0.8-0.3,1.1-0.5c0.8-0.4,1.6-0.9,2.4-1.4
			c0.3-0.2,0.5-0.3,0.8-0.5c1-0.7,2-1.4,3-2.2l0,0c1.1-0.9,2.1-1.8,3.1-2.8l114.7-114.7C872,818.6,872,794.4,857.1,779.4z" />
    <path d="M466.1,830H236.3V140.5H581v153.2c0,21.2,17.1,38.3,38.3,38.3h153.2v134.1c0,21.2,17.1,38.3,38.3,38.3
			s38.3-17.1,38.3-38.3V293.8c0-1.2-0.1-2.5-0.2-3.7c-0.1-0.6-0.2-1.2-0.2-1.8c-0.1-0.6-0.2-1.2-0.3-1.8c-0.1-0.7-0.3-1.5-0.5-2.2
			c-0.1-0.4-0.2-0.8-0.3-1.3c-0.2-0.8-0.5-1.6-0.8-2.3c-0.1-0.3-0.2-0.7-0.4-1c-0.3-0.8-0.6-1.5-1-2.3c-0.1-0.3-0.3-0.6-0.5-0.9
			c-0.4-0.7-0.8-1.5-1.2-2.2c-0.2-0.3-0.4-0.6-0.6-0.9c-0.4-0.7-0.9-1.4-1.4-2c-0.2-0.3-0.5-0.6-0.7-1c-0.5-0.6-1-1.2-1.5-1.8
			c-0.1-0.1-0.2-0.3-0.4-0.5L666.9,76.6c-7.3-8.1-17.6-12.7-28.5-12.7H236.3c-42.2,0-76.6,34.4-76.6,76.6V830
			c0,42.2,34.4,76.6,76.6,76.6h229.8c21.2,0,38.3-17.1,38.3-38.3C504.4,847.1,487.3,830,466.1,830z M657.6,180.8l67.2,74.7h-67.2
			V180.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>
