import React, { forwardRef, Fragment } from 'react'
import IconBase from '../primitives/IconBase'

const renderPath = {}

renderPath['outline'] = (color) => (
  <Fragment>
    <path
      fill='none'
      d='M7.33,8.79A1.46,1.46,0,0,1,8.79,7.33h.67a1.46,1.46,0,0,0,1-.43L11,6.43a1.47,1.47,0,0,1,2.07,0h0l.47.47a1.46,1.46,0,0,0,1,.43h.67a1.46,1.46,0,0,1,1.46,1.46h0v.67a1.46,1.46,0,0,0,.43,1l.47.47a1.47,1.47,0,0,1,0,2.07h0l-.47.47a1.46,1.46,0,0,0-.43,1v.67a1.46,1.46,0,0,1-1.46,1.46h-.67a1.46,1.46,0,0,0-1,.43l-.47.47a1.47,1.47,0,0,1-2.07,0h0l-.47-.47a1.46,1.46,0,0,0-1-.43H8.79a1.46,1.46,0,0,1-1.46-1.46h0v-.67a1.46,1.46,0,0,0-.43-1L6.43,13a1.47,1.47,0,0,1,0-2.07h0l.47-.47a1.46,1.46,0,0,0,.43-1V8.79'
    />
    <line x1='9.99' y1='13.99' x2='13.99' y2='9.99' />
    <circle fill='none' cx='10.33' cy='10.33' r='0.33' />
    <circle fill='none' cx='13.66' cy='13.66' r='0.33' />
  </Fragment>
)

renderPath['fill'] = () => (
  <Fragment>
    <path
      stroke='none'
      d='M17.92,10.61l-.47-.47a1,1,0,0,1-.28-.68V8.79a2,2,0,0,0-2-2h-.67a1,1,0,0,1-.68-.28l-.47-.48A2,2,0,0,0,12,5.5h0a2,2,0,0,0-1.38.58l-.47.47a1,1,0,0,1-.68.28H8.79a2,2,0,0,0-2,2v.67a1,1,0,0,1-.28.68l-.48.47A2,2,0,0,0,5.5,12a2,2,0,0,0,.58,1.38l.47.47a1,1,0,0,1,.28.68v.67a2,2,0,0,0,2,2h.67a1,1,0,0,1,.68.28l.47.48A2,2,0,0,0,12,18.5h0a2,2,0,0,0,1.38-.58l.47-.47a1,1,0,0,1,.68-.28h.67a2,2,0,0,0,2-2v-.67a1,1,0,0,1,.28-.68l.48-.47A2,2,0,0,0,18.5,12,2,2,0,0,0,17.92,10.61ZM10.33,9.49a.84.84,0,0,1,.83.84.83.83,0,0,1-.83.83.84.84,0,0,1-.84-.83A.85.85,0,0,1,10.33,9.49Zm3.33,5a.83.83,0,1,1,.83-.83A.83.83,0,0,1,13.66,14.49Zm.69-4.14-4,4a.52.52,0,0,1-.71,0,.5.5,0,0,1,0-.71l4-4a.5.5,0,0,1,.71,0A.51.51,0,0,1,14.35,10.35Z'
    />
  </Fragment>
)

renderPath['duotone'] = (color) => (
  <Fragment>
    <path
      fillOpacity='.2'
      d='M7.33,8.79A1.46,1.46,0,0,1,8.79,7.33h.67a1.46,1.46,0,0,0,1-.43L11,6.43a1.47,1.47,0,0,1,2.07,0h0l.47.47a1.46,1.46,0,0,0,1,.43h.67a1.46,1.46,0,0,1,1.46,1.46h0v.67a1.46,1.46,0,0,0,.43,1l.47.47a1.47,1.47,0,0,1,0,2.07h0l-.47.47a1.46,1.46,0,0,0-.43,1v.67a1.46,1.46,0,0,1-1.46,1.46h-.67a1.46,1.46,0,0,0-1,.43l-.47.47a1.47,1.47,0,0,1-2.07,0h0l-.47-.47a1.46,1.46,0,0,0-1-.43H8.79a1.46,1.46,0,0,1-1.46-1.46h0v-.67a1.46,1.46,0,0,0-.43-1L6.43,13a1.47,1.47,0,0,1,0-2.07h0l.47-.47a1.46,1.46,0,0,0,.43-1V8.79'
    />
    <line x1='9.99' y1='13.99' x2='13.99' y2='9.99' />
    <circle fill='none' cx='10.33' cy='10.33' r='0.33' />
    <circle fill='none' cx='13.66' cy='13.66' r='0.33' />
  </Fragment>
)

renderPath['color'] = (color, secondaryColor) => (
  <Fragment>
    <path
      fill={secondaryColor}
      d='M7.33,8.79A1.46,1.46,0,0,1,8.79,7.33h.67a1.46,1.46,0,0,0,1-.43L11,6.43a1.47,1.47,0,0,1,2.07,0h0l.47.47a1.46,1.46,0,0,0,1,.43h.67a1.46,1.46,0,0,1,1.46,1.46h0v.67a1.46,1.46,0,0,0,.43,1l.47.47a1.47,1.47,0,0,1,0,2.07h0l-.47.47a1.46,1.46,0,0,0-.43,1v.67a1.46,1.46,0,0,1-1.46,1.46h-.67a1.46,1.46,0,0,0-1,.43l-.47.47a1.47,1.47,0,0,1-2.07,0h0l-.47-.47a1.46,1.46,0,0,0-1-.43H8.79a1.46,1.46,0,0,1-1.46-1.46h0v-.67a1.46,1.46,0,0,0-.43-1L6.43,13a1.47,1.47,0,0,1,0-2.07h0l.47-.47a1.46,1.46,0,0,0,.43-1V8.79'
    />
    <line x1='9.99' y1='13.99' x2='13.99' y2='9.99' />
    <circle fill='none' cx='10.33' cy='10.33' r='0.33' />
    <circle fill='none' cx='13.66' cy='13.66' r='0.33' />
  </Fragment>
)

const Discount2 = forwardRef((props, ref) => {
  return <IconBase ref={ref} {...props} renderPath={renderPath} />
})

export default Discount2
