<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="M459.4,875.3H215.9V144.9h365.2v162.3c0,22.4,18.1,40.6,40.6,40.6H784v142c0,22.4,18.1,40.6,40.6,40.6
			c22.4,0,40.6-18.1,40.6-40.6V307.2c0-1.3-0.1-2.6-0.2-3.9c-0.1-0.6-0.2-1.3-0.3-1.9s-0.2-1.3-0.3-1.9c-0.2-0.8-0.3-1.5-0.5-2.3
			c-0.1-0.4-0.2-0.9-0.3-1.3c-0.2-0.8-0.5-1.6-0.8-2.5c-0.1-0.4-0.3-0.7-0.4-1.1c-0.3-0.8-0.7-1.6-1.1-2.4c-0.2-0.3-0.3-0.7-0.5-1
			c-0.4-0.8-0.8-1.6-1.3-2.3c-0.2-0.3-0.4-0.7-0.6-1c-0.5-0.7-0.9-1.4-1.4-2.1c-0.2-0.3-0.5-0.7-0.8-1c-0.5-0.7-1-1.3-1.6-1.9
			c-0.1-0.2-0.3-0.3-0.4-0.5L672.1,77.2c-7.7-8.6-18.7-13.4-30.2-13.4h-426c-44.7,0-81.2,36.4-81.2,81.2v730.4
			c0,44.7,36.4,81.2,81.2,81.2h243.5c22.4,0,40.6-18.1,40.6-40.6C500,893.4,481.8,875.3,459.4,875.3z M662.3,187.5l71.2,79.1h-71.2
			V187.5z" />
    <path d="M865.2,591.3c-22.4,0-40.6,18.1-40.6,40.6v121.7H638.5l32.2-32.2c15.9-15.9,15.9-41.5,0-57.4s-41.5-15.9-57.4,0
			L512.1,765.2c-1.1,1-2.1,2.1-3,3.3l0,0c-0.8,1-1.6,2.1-2.3,3.1c-0.2,0.3-0.3,0.6-0.5,0.9c-0.5,0.8-1,1.7-1.5,2.5
			c-0.2,0.4-0.4,0.8-0.6,1.2c-0.4,0.8-0.8,1.6-1.1,2.4c-0.2,0.4-0.3,0.9-0.5,1.4c-0.3,0.8-0.6,1.6-0.8,2.4c-0.2,0.5-0.3,1-0.4,1.5
			c-0.2,0.8-0.4,1.5-0.6,2.3c-0.1,0.6-0.2,1.3-0.3,1.9c-0.1,0.7-0.2,1.3-0.3,2c-0.3,2.7-0.3,5.3,0,8c0.1,0.7,0.2,1.3,0.3,2
			c0.1,0.6,0.2,1.3,0.3,1.9c0.2,0.8,0.4,1.5,0.6,2.3c0.1,0.5,0.2,1,0.4,1.5c0.2,0.8,0.5,1.6,0.8,2.4c0.2,0.4,0.3,0.9,0.5,1.4
			c0.3,0.8,0.7,1.6,1.1,2.4c0.2,0.4,0.4,0.8,0.6,1.2c0.5,0.9,1,1.7,1.5,2.5c0.2,0.3,0.3,0.6,0.5,0.9c0.7,1.1,1.5,2.1,2.3,3.1l0,0
			c0.9,1.1,1.9,2.2,3,3.3l101.2,101.2c7.9,7.9,18.3,11.9,28.7,11.9s20.8-4,28.7-11.9c15.9-15.9,15.9-41.5,0-57.4l-32.2-32.2h226.7
			c22.4,0,40.6-18.1,40.6-40.6V631.8C905.7,609.4,887.6,591.3,865.2,591.3z" />
  </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>
