import { FC } from 'react'

import Svg, { Path } from 'react-native-svg'

import { useTheme } from '../../../../providers/native'
import { SvgIconProps } from '../types'

const ArchiveIcon: FC<SvgIconProps> = ({
  isActive = false,
  color,
  width = '20',
  height = '20',
  ...props
}) => {
  const { colors } = useTheme()

  const defaultColor = color ?? colors.object.high
  const svgColor = isActive ? colors.primary.high : defaultColor

  return (
    <Svg width={width} height={height} viewBox="0 0 20 20" color={svgColor} {...props}>
      <Path
        d="M15.0003 1.87109H12.4994C12.1544 1.87109 11.8744 2.15109 11.8744 2.49609C11.8744 2.84109 12.1544 3.12109 12.4994 3.12109H15.0003C16.0353 3.12109 16.8769 3.96276 16.8769 4.99693V11.8744H13.8486C13.2911 11.8744 12.7903 12.1844 12.5436 12.6811L12.1711 13.4269C12.1353 13.4978 12.0636 13.5428 11.9836 13.5428H8.01276C7.93276 13.5428 7.86193 13.4986 7.82609 13.4269L7.45276 12.6794C7.20359 12.1836 6.70443 11.8753 6.14943 11.8753H3.12026V4.99776C3.12026 3.96276 3.96193 3.12193 4.99609 3.12193H7.49693C7.84193 3.12193 8.12193 2.84193 8.12193 2.49693C8.12193 2.15193 7.84193 1.87193 7.49693 1.87193H4.99693C3.27359 1.87193 1.87109 3.27443 1.87109 4.99776V15.0011C1.87109 16.7244 3.27359 18.1278 4.99693 18.1278H15.0003C16.7236 18.1278 18.1269 16.7244 18.1269 15.0011V4.99776C18.1269 3.27359 16.7236 1.87109 15.0003 1.87109ZM16.8769 15.0011C16.8769 16.0361 16.0353 16.8778 15.0003 16.8778H4.99693C3.96193 16.8778 3.12109 16.0361 3.12109 15.0011V13.1253H6.14859C6.22693 13.1253 6.30026 13.1711 6.33526 13.2394L6.70776 13.9861C6.95609 14.4844 7.45609 14.7936 8.01276 14.7936H11.9836C12.5403 14.7936 13.0403 14.4844 13.2886 13.9869L13.6619 13.2403C13.6969 13.1694 13.7686 13.1253 13.8486 13.1253H16.8769V15.0011Z"
        fill="currentColor"
      />
      <Path
        d="M7.05526 7.79109C6.93359 7.91276 6.87193 8.07276 6.87193 8.23276C6.87193 8.39276 6.93276 8.55276 7.05526 8.67443L9.55609 11.1753C9.56026 11.1794 9.56526 11.1803 9.56943 11.1836C9.62443 11.2361 9.68776 11.2794 9.75859 11.3094C9.83526 11.3411 9.91609 11.3578 9.99776 11.3578C10.0794 11.3578 10.1611 11.3411 10.2378 11.3086C10.2886 11.2878 10.3294 11.2519 10.3728 11.2194C10.3944 11.2028 10.4203 11.1944 10.4403 11.1744L12.9411 8.67359C13.0628 8.55193 13.1244 8.39193 13.1244 8.23193C13.1244 8.07193 13.0636 7.91193 12.9411 7.79026C12.6969 7.54609 12.3011 7.54609 12.0569 7.79026L10.6228 9.22443V4.33193C10.6228 3.98693 10.3428 3.70693 9.99776 3.70693C9.65276 3.70693 9.37276 3.98693 9.37276 4.33193V9.22443L7.93943 7.79109C7.69526 7.54693 7.29943 7.54693 7.05526 7.79109Z"
        fill="currentColor"
      />
    </Svg>
  )
}

export default ArchiveIcon
