import { FC } from 'react'

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

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

const BiometricsIcon: FC<SvgIconProps> = ({
  isActive = false,
  color,
  width = '21',
  height = '21',
  ...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 21 21" color={svgColor} fill="none" {...props}>
      <Path
        fillRule="evenodd"
        clipRule="evenodd"
        d="M3.07715 4.54921C3.07715 3.27905 4.1062 2.25 5.37636 2.25H7.42821C7.82229 2.25 8.14176 2.56947 8.14176 2.96355C8.14176 3.35763 7.82229 3.6771 7.42821 3.6771H5.37636C4.89436 3.6771 4.50425 4.06722 4.50425 4.54921V6.60106C4.50425 6.99515 4.18478 7.31461 3.7907 7.31461C3.39662 7.31461 3.07715 6.99515 3.07715 6.60106V4.54921ZM13.7107 2.96355C13.7107 2.56947 14.0302 2.25 14.4243 2.25H16.4761C17.7463 2.25 18.7753 3.27905 18.7753 4.54921V6.60106C18.7753 6.99515 18.4558 7.31461 18.0618 7.31461C17.6677 7.31461 17.3482 6.99515 17.3482 6.60106V4.54921C17.3482 4.06722 16.9581 3.6771 16.4761 3.6771H14.4243C14.0302 3.6771 13.7107 3.35763 13.7107 2.96355ZM7.3586 7.07017C7.75268 7.07017 8.07215 7.38964 8.07215 7.78372V8.97297C8.07215 9.36705 7.75268 9.68652 7.3586 9.68652C6.96452 9.68652 6.64505 9.36705 6.64505 8.97297V7.78372C6.64505 7.38964 6.96452 7.07017 7.3586 7.07017ZM14.4941 7.07017C14.8882 7.07017 15.2076 7.38964 15.2076 7.78372V8.97297C15.2076 9.36705 14.8882 9.68652 14.4941 9.68652C14.1 9.68652 13.7805 9.36705 13.7805 8.97297V7.78372C13.7805 7.38964 14.1 7.07017 14.4941 7.07017ZM11.3229 7.08411C11.717 7.08411 12.0365 7.40358 12.0365 7.79766V10.5726C12.0365 11.4043 11.3618 12.079 10.5301 12.079H10.1337C9.73958 12.079 9.42012 11.7595 9.42012 11.3654C9.42012 10.9713 9.73958 10.6519 10.1337 10.6519H10.5301C10.5736 10.6519 10.6094 10.6161 10.6094 10.5726V7.79766C10.6094 7.40358 10.9288 7.08411 11.3229 7.08411ZM7.85221 12.89C8.13086 12.6113 8.58266 12.6113 8.86132 12.89C10.0018 14.0305 11.8516 14.0305 12.9921 12.89C13.2708 12.6113 13.7226 12.6113 14.0012 12.89C14.2799 13.1687 14.2799 13.6205 14.0012 13.8991C12.3034 15.5969 9.55003 15.5969 7.85221 13.8991C7.57355 13.6205 7.57355 13.1687 7.85221 12.89ZM3.7907 12.8836C4.18478 12.8836 4.50425 13.203 4.50425 13.5971V15.649C4.50425 16.1309 4.89436 16.5211 5.37636 16.5211H7.42821C7.82229 16.5211 8.14176 16.8405 8.14176 17.2346C8.14176 17.6287 7.82229 17.9482 7.42821 17.9482H5.37636C4.1062 17.9482 3.07715 16.9191 3.07715 15.649V13.5971C3.07715 13.203 3.39662 12.8836 3.7907 12.8836ZM18.0618 12.8836C18.4558 12.8836 18.7753 13.203 18.7753 13.5971V15.649C18.7753 16.9191 17.7463 17.9482 16.4761 17.9482H14.4243C14.0302 17.9482 13.7107 17.6287 13.7107 17.2346C13.7107 16.8405 14.0302 16.5211 14.4243 16.5211H16.4761C16.9581 16.5211 17.3482 16.1309 17.3482 15.649V13.5971C17.3482 13.203 17.6677 12.8836 18.0618 12.8836Z"
        fill="currentColor"
      />
    </Svg>
  )
}

export default BiometricsIcon
