import { useIcon } from 'hooks';
import React, { useMemo } from 'react';
import Svg, { Path } from 'react-native-svg';
import { IconProps } from '../types';

export const CollapseBack: React.FC<IconProps> = ({ colorVariant = 'body', ...props }) => {
  const { getIconColor } = useIcon();
  const color = useMemo(() => getIconColor(colorVariant), [getIconColor, colorVariant]);
  return (
    <Svg width="20" height="20" viewBox="0 0 20 20" fill="none" {...props}>
      <Path
        d="M1.76215 16.1943C1.54197 16.1943 1.3599 16.1223 1.21594 15.9784C1.07198 15.8344 1 15.6524 1 15.4322C1 15.212 1.07198 15.0299 1.21594 14.886C1.3599 14.742 1.54197 14.67 1.76215 14.67H13.4484C13.6685 14.67 13.8506 14.742 13.9946 14.886C14.1385 15.0299 14.2105 15.212 14.2105 15.4322C14.2105 15.6524 14.1385 15.8344 13.9946 15.9784C13.8506 16.1223 13.6685 16.1943 13.4484 16.1943H1.76215ZM1.76215 10.8085C1.54197 10.8085 1.3599 10.7365 1.21594 10.5926C1.07198 10.4486 1 10.2665 1 10.0464C1 9.82618 1.07198 9.64411 1.21594 9.50015C1.3599 9.35619 1.54197 9.28421 1.76215 9.28421H10.3998C10.62 9.28421 10.802 9.35619 10.946 9.50015C11.09 9.64411 11.1619 9.82618 11.1619 10.0464C11.1619 10.2665 11.09 10.4486 10.946 10.5926C10.802 10.7365 10.62 10.8085 10.3998 10.8085H1.76215ZM1.76215 5.52429C1.54197 5.52429 1.3599 5.45231 1.21594 5.30835C1.07198 5.16439 1 4.98232 1 4.76215C1 4.54197 1.07198 4.3599 1.21594 4.21594C1.3599 4.07198 1.54197 4 1.76215 4H13.4484C13.6685 4 13.8506 4.07198 13.9946 4.21594C14.1385 4.3599 14.2105 4.54197 14.2105 4.76215C14.2105 4.98232 14.1385 5.16439 13.9946 5.30835C13.8506 5.45231 13.6685 5.52429 13.4484 5.52429H1.76215ZM15.6078 10.0718L18.7834 13.2474C18.9358 13.3998 19.0078 13.5776 18.9993 13.7809C18.9909 13.9841 18.9104 14.1619 18.758 14.3144C18.6056 14.4668 18.4235 14.543 18.2118 14.543C18.0001 14.543 17.818 14.4668 17.6656 14.3144L13.9565 10.6053C13.804 10.4528 13.7278 10.275 13.7278 10.0718C13.7278 9.86852 13.804 9.69068 13.9565 9.53826L17.6656 5.82915C17.818 5.67672 18.0001 5.6005 18.2118 5.6005C18.4235 5.6005 18.6056 5.67672 18.758 5.82915C18.9104 5.98158 18.9866 6.16365 18.9866 6.37535C18.9866 6.58706 18.9104 6.76913 18.758 6.92156L15.6078 10.0718Z"
        fill={color}
      />
    </Svg>
  );
};
