import { forwardRef } from "react";
import type { IconProps } from "@/types";

export const IconSvg = forwardRef<SVGSVGElement, IconProps>(
  ({ color = "currentColor", ...props }, forwardedRef) => {
    const { className } = props;
    props = {
      ...props,
      width: `${props.width || props.size || 20}`,
      height: `${props.height || props.size || 20}`,
      className: `${
        className ? className + " " : ""
      }customeow-icon customeow-icon-icon-svg`,
    };
    return (
      <svg
        viewBox="0 0 20 20"
        fill="none"
        xmlns="http://www.w3.org/2000/svg"
        {...props}
        ref={forwardedRef}
      >
        <path
          d="M3.49777 5.07776C2.71415 5.07776 2.04655 5.32303 1.51476 5.82302L1.51333 5.82438C.98708 6.32677.726162 6.96892.726162 7.7298.726162 8.28587.875189 8.78468 1.1784 9.21632 1.47981 9.6454 1.92403 9.99425 2.49289 10.27L3.6436 10.8334C4.1126 11.0696 4.39465 11.2502 4.52315 11.3748 4.71963 11.5718 4.82671 11.8368 4.82671 12.1967 4.82671 12.5811 4.70006 12.8672 4.45739 13.0825 4.22015 13.2912 3.88165 13.4102 3.41076 13.4102 2.8325 13.4102 2.28057 13.1958 1.74948 12.7434 1.6043 12.5968 1.42207 12.4823 1.20709 12.49.984556 12.498.811295 12.6334.682888 12.7983L.678951 12.8036C.563913 12.9593.491784 13.1363.50075 13.3285.509748 13.5214.598555 13.6901.729234 13.8323L.735449 13.8391.742128 13.8454C1.49888 14.5598 2.38846 14.9223 3.39988 14.9223 4.26942 14.9223 4.99785 14.653 5.56078 14.0997 6.10018 13.5728 6.36727 12.9029 6.36727 12.1108 6.36727 11.444 6.19555 10.8726 5.83348 10.4169 5.55434 10.0563 5.1294 9.7447 4.58066 9.4733L3.43652 8.92007 3.43548 8.91958C3.01289 8.71755 2.74423 8.55504 2.60557 8.43341 2.37714 8.22095 2.26672 7.96729 2.26672 7.65617 2.26672 7.31965 2.37671 7.07433 2.5824 6.89243 2.80067 6.69802 3.09721 6.5899 3.49777 6.5899 3.96878 6.5899 4.40371 6.74546 4.80928 7.06837 4.95006 7.19439 5.12735 7.28723 5.33115 7.26303 5.5348 7.23884 5.69001 7.10629 5.80492 6.95172L5.80643 6.94964C5.91181 6.8049 5.9818 6.63966 5.97555 6.45989 5.96918 6.27675 5.8852 6.11964 5.76181 5.99156L5.75554 5.98504 5.74882 5.97898C5.08902 5.38345 4.33591 5.07776 3.49777 5.07776ZM16.8372 5.07776C15.6858 5.07776 14.738 5.53033 14.0144 6.42564 13.2779 7.33536 12.9235 8.54432 12.9235 10.0246 12.9235 11.4957 13.2702 12.6961 13.9916 13.5977 14.6944 14.4787 15.6289 14.9223 16.7719 14.9223 17.7415 14.9223 18.5611 14.6296 19.2099 14.0316L19.2195 14.0227 19.2281 14.0129C19.4139 13.8034 19.5 13.543 19.5 13.252V10.54C19.5 10.2819 19.4292 10.0466 19.2608 9.86494 19.0976 9.67231 18.8743 9.58145 18.621 9.58145H17.0438C16.8575 9.58145 16.6727 9.63545 16.54 9.78526 16.4125 9.92911 16.3714 10.1186 16.3714 10.3068 16.3714 10.4978 16.4118 10.6893 16.5378 10.8351 16.67 10.9882 16.8554 11.0445 17.0438 11.0445H18.0573V13.0326C17.7881 13.2751 17.4032 13.4102 16.8698 13.4102 16.1095 13.4102 15.5336 13.117 15.1129 12.5261 14.6974 11.9303 14.4749 11.0894 14.4749 9.97551 14.4749 8.88913 14.707 8.06146 15.1428 7.46548 15.5731 6.87712 16.1374 6.5899 16.8589 6.5899 17.3384 6.5899 17.7464 6.74198 18.0953 7.04736 18.2292 7.18087 18.4048 7.2877 18.6143 7.2666 18.8223 7.24565 18.9778 7.10659 19.0905 6.95094 19.1937 6.81362 19.2657 6.65717 19.2688 6.48584 19.272 6.30818 19.2005 6.15233 19.0868 6.024L19.0816 6.01815 19.076 6.01263C18.4555 5.39223 17.7047 5.07776 16.8372 5.07776ZM7.17699 5.24956C6.9312 5.24956 6.67805 5.31516 6.53505 5.537 6.40016 5.74625 6.42198 6.01008 6.49311 6.25574L8.76585 14.3042C8.80094 14.4286 8.86347 14.548 8.96967 14.6359 9.07862 14.726 9.20924 14.7628 9.34147 14.7628H9.74391C9.96318 14.7628 10.1657 14.7024 10.3311 14.5648 10.4935 14.4296 10.5968 14.2386 10.6571 14.0204L12.854 6.24093C12.9215 5.99908 12.9409 5.74053 12.8091 5.53463 12.6686 5.31517 12.4207 5.24956 12.1803 5.24956 11.9927 5.24956 11.8163 5.30235 11.6724 5.42494 11.5317 5.54483 11.4457 5.71135 11.3968 5.89668L10.233 10.3145 10.2326 10.3161C10.153 10.6265 10.0407 11.0597 9.89567 11.6159L9.89513 11.618C9.81898 11.9204 9.7493 12.1937 9.6861 12.4377 9.61749 12.1734 9.5429 11.8759 9.46255 11.5459 9.33205 11.0142 9.2263 10.6026 9.14551 10.3124L7.97197 5.89903C7.92664 5.71197 7.84092 5.54384 7.69652 5.42327 7.54936 5.30041 7.36837 5.24956 7.17699 5.24956Z"
          fill={color}
        />
      </svg>
    );
  }
);

IconSvg.displayName = "IconSvg";

export default IconSvg;
