"use client";

import React from "react";
import type { CSSProperties } from "react";

import { useIconSize } from "../contexts/IconSizeContext";

type Props = {
  size?: number;
  color?: string;
  style?: CSSProperties;
};

export default function GitBranchSlash({
  color = "currentcolor",
  size,
  ...props
}: Props) {
  const iconSize = useIconSize();
  const height = size || iconSize.size;
  const width = size || iconSize.size;
  const style = { color, ...props.style };
  return (
    <svg
      {...props}
      data-testid="geist-icon"
      height={height}
      strokeLinejoin="round"
      style={style}
      viewBox="0 0 16 16"
      width={width}
    >
      <path
        fillRule="evenodd"
        clipRule="evenodd"
        d="M13.588 14.627C13.879 14.8187 14.2742 14.7865 14.5303 14.5304C14.8232 14.2375 14.8232 13.7627 14.5303 13.4698L11.2737 10.2131C12.0332 9.26243 12.5211 8.12438 12.6868 6.92102C14.0126 6.61045 14.9999 5.42053 14.9999 4.00002C14.9999 2.34317 13.6567 1.00002 11.9999 1.00002C10.343 1.00002 8.99988 2.34317 8.99988 4.00002C8.99988 5.37071 9.91913 6.5267 11.1748 6.88512C11.0348 7.70347 10.7024 8.478 10.2045 9.14391L4.74989 3.68925V1.75002V1.00002H3.24989V1.75002V2.18924L1.53033 0.469672C1.23744 0.176778 0.762566 0.176776 0.469672 0.469668C0.213411 0.725927 0.181358 1.12149 0.373514 1.4126L13.588 14.627ZM3.24989 6.41026V9.09454C1.95597 9.42757 0.999888 10.6021 0.999888 12C0.999888 13.6569 2.34303 15 3.99989 15C5.4204 15 6.61031 14.0127 6.92088 12.6869C7.61833 12.5909 8.29383 12.3866 8.92363 12.084L7.77903 10.9394C7.48935 11.0437 7.19022 11.1227 6.88499 11.1749C6.59428 10.1565 5.77892 9.35939 4.74989 9.09454V7.91025L3.24989 6.41026ZM13.4999 4.00002C13.4999 4.82845 12.8283 5.50002 11.9999 5.50002C11.1715 5.50002 10.4999 4.82845 10.4999 4.00002C10.4999 3.1716 11.1715 2.50002 11.9999 2.50002C12.8283 2.50002 13.4999 3.1716 13.4999 4.00002ZM3.99989 13.5C4.82831 13.5 5.49989 12.8285 5.49989 12C5.49989 11.1716 4.82831 10.5 3.99989 10.5C3.17146 10.5 2.49989 11.1716 2.49989 12C2.49989 12.8285 3.17146 13.5 3.99989 13.5Z"
        fill="currentColor"
      />
    </svg>
  );
}
