import { useAppSelector } from "redux/hooks";
import { ProGray1 } from "ThemeConstants";

interface NextIconType {
  className?: string;
  onClick?: () => void;
  iconColor?: string;
  iconSize?: number;
}

const NextIcon = ({ className, onClick, iconColor, iconSize }: NextIconType) => {
  const { themeName } = useAppSelector((state) => state.theme);
  const color = iconColor || (themeName === "dark" ? "white" : ProGray1);
  return (
    <svg
      width={iconSize || 16}
      height={iconSize || 16}
      viewBox="0 0 16 16"
      fill="none"
      xmlns="http://www.w3.org/2000/svg"
      className={className}
      onClick={onClick}
    >
      <path
        d="M6 12L10 8L6 4"
        stroke={color}
        strokeWidth="1.5"
        strokeLinecap="round"
        strokeLinejoin="round"
      />
    </svg>
  );
};

export default NextIcon;
