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

export const Symbol: React.FC<IconProps> = ({ colorVariant = 'body', ...props }) => {
  const { getIconColor } = useIcon();
  const color = useMemo(() => getIconColor(colorVariant), [getIconColor, colorVariant]);

  return (
    <Svg width="21" height="20" viewBox="0 0 21 20" fill="none" {...props}>
      <Path
        fillRule="evenodd"
        clipRule="evenodd"
        d="M0.922363 0.126953H9.82204V1.74508H0.922363V0.126953ZM4.15861 9.02866H6.58579V4.98336H9.82204V3.36523H0.922363V4.98336H4.15861V9.02866ZM15.4852 11.8646C15.4852 12.9787 14.5799 13.8816 13.4626 13.8816C12.3453 13.8816 11.4399 12.9787 11.4399 11.8646C11.4399 10.7506 12.3453 9.84766 13.4626 9.84766C14.5799 9.84766 15.4852 10.7506 15.4852 11.8646ZM13.4626 11.4646C13.6859 11.4646 13.8672 11.6443 13.8672 11.8635C13.8672 12.0836 13.6859 12.2624 13.4626 12.2624C13.2393 12.2624 13.0581 12.0836 13.0581 11.8635C13.0581 11.6435 13.2393 11.4646 13.4626 11.4646ZM16.2944 17.5268C16.2944 16.4127 17.1998 15.5098 18.3171 15.5098C19.4344 15.5098 20.3397 16.4127 20.3397 17.5268C20.3397 18.6408 19.4344 19.5437 18.3171 19.5437C17.1998 19.5437 16.2944 18.6408 16.2944 17.5268ZM18.3171 17.9245C18.0954 17.9258 17.9144 17.7474 17.9126 17.5256C17.9126 17.3064 18.0938 17.1268 18.3171 17.1268C18.5404 17.1268 18.7217 17.3064 18.7217 17.5256C18.7199 17.7474 18.5389 17.9258 18.3171 17.9245ZM11.4399 17.928L18.7215 10.6465L19.9375 11.8528L12.6641 19.1416L11.4399 17.928ZM14.6762 9.02663C16.4634 9.02663 17.9125 8.12129 17.9125 7.00398V1.74508C17.9125 1.74508 18.7094 1.61482 19.1244 2.51288C19.5387 3.4077 19.5306 4.98133 19.5306 4.98133C19.5306 4.98133 20.3396 4.07599 20.3396 2.44492C20.3396 0.110775 17.9125 0.126956 17.9125 0.126956H16.2943V5.26207C15.7754 5.07496 15.2278 4.97995 14.6762 4.98133C12.889 4.98133 11.44 5.88666 11.44 7.00398C11.44 8.12129 12.889 9.02663 14.6762 9.02663ZM8.05959 15.4165L9.25295 16.6988L8.17447 17.6171L9.86541 19.5451H7.58467L6.74163 18.6252C5.63402 19.2385 4.6057 19.5451 3.65667 19.5451C2.85004 19.5451 2.19713 19.3234 1.69875 18.8792C1.20036 18.4367 0.951173 17.8679 0.951173 17.1745C0.9508 16.6504 1.09739 16.1366 1.37431 15.6915C1.65748 15.2255 2.14049 14.7449 2.82577 14.2482C2.14858 13.393 1.80959 12.6365 1.80959 11.9787C1.80959 11.4909 2.03289 11.0103 2.48273 10.5354C2.93095 10.0613 3.56363 9.82422 4.37917 9.82422C5.20441 9.82422 5.8379 10.0588 6.27965 10.5289C6.72059 10.999 6.94146 11.4731 6.94146 11.9521C6.94146 12.3283 6.83952 12.6883 6.63726 13.033C6.43499 13.3776 5.96816 13.8873 5.23839 14.5637C6.09276 15.5079 6.64454 16.0969 6.89292 16.3299C7.28764 16.0329 7.6766 15.7284 8.05959 15.4165ZM3.80342 11.5265C3.9616 11.3738 4.1742 11.2905 4.39403 11.2951C4.64484 11.2951 4.8463 11.3639 4.9984 11.5006C5.14973 11.6358 5.23354 11.831 5.22737 12.0338C5.22737 12.4529 4.88837 12.9335 4.21038 13.4771C3.77672 12.9504 3.55908 12.4812 3.55908 12.0678C3.56001 11.8608 3.64884 11.6641 3.80342 11.5265ZM3.09258 17.6449C3.31831 17.8334 3.60229 17.9272 3.94776 17.9272C4.44452 17.9272 5.06346 17.7225 5.8086 17.3123C5.37899 16.9143 4.773 16.2573 3.98983 15.3398C3.16621 15.983 2.75439 16.5445 2.75439 17.0251C2.75439 17.2508 2.86685 17.4572 3.09258 17.6449Z"
        fill={color}
      />
    </Svg>
  );
};
