"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 GlobeSlash({
  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="M10.4815 13.6418L9.51945 12.6797C9.45898 12.8462 9.39561 13.0051 9.32968 13.1558C9.05422 13.7854 8.7585 14.2165 8.49353 14.4726L8.48347 14.4823C8.32384 14.494 8.16262 14.5 8 14.5C7.83738 14.5 7.67616 14.494 7.51654 14.4823L7.50647 14.4726C7.2415 14.2165 6.94578 13.7854 6.67032 13.1558C6.41594 12.5744 6.19979 11.8714 6.04101 11.0778C6.66487 11.1083 7.30798 11.1244 7.96467 11.125L6.69318 9.85351C6.40697 9.84402 6.12489 9.83146 5.84749 9.81598C5.81613 9.5302 5.79188 9.23644 5.77542 8.93575L4.50304 7.66338C4.50102 7.77501 4.5 7.88723 4.5 8C4.5 8.59133 4.52807 9.16768 4.58133 9.72246C3.48633 9.62096 2.48837 9.47245 1.62761 9.28806C1.54392 8.87172 1.5 8.44099 1.5 8C1.5 7.55901 1.54392 7.12828 1.62761 6.71194C2.13015 6.60429 2.67946 6.50886 3.26753 6.42788L2.17298 5.33334C2.13567 5.33985 2.09854 5.34643 2.06159 5.35306C2.07504 5.32292 2.08873 5.29289 2.10263 5.26299L0.987052 4.14742C0.357924 5.2902 0 6.6033 0 8C0 12.4183 3.58172 16 8 16C9.39672 16 10.7098 15.6421 11.8526 15.0129L10.7371 13.8974C10.5838 13.9686 10.4274 14.034 10.268 14.0934C10.3418 13.9496 10.4131 13.7989 10.4815 13.6418ZM14.5881 15.6271L0.373467 1.41253C0.181363 1.12143 0.213432 0.725906 0.469672 0.469668C0.762566 0.176776 1.23744 0.176778 1.53033 0.469672L2.89823 1.83758C4.28299 0.689879 6.06093 0 8 0C12.4183 0 16 3.58172 16 8C16 9.93909 15.3101 11.7171 14.1624 13.1018L15.5303 14.4698C15.8232 14.7627 15.8232 15.2375 15.5303 15.5304C15.2743 15.7865 14.8791 15.8187 14.5881 15.6271ZM13.9384 10.6469C13.3306 10.7561 12.6755 10.8487 11.983 10.9224L13.096 12.0354C13.4316 11.6122 13.7155 11.1462 13.9384 10.6469ZM7.19375 6.13313L10.2114 9.15081C10.2367 8.77781 10.25 8.3935 10.25 8C10.25 7.36805 10.2157 6.75982 10.1525 6.18401C9.46123 6.14545 8.74091 6.125 8 6.125C7.72834 6.125 7.45946 6.12775 7.19375 6.13313ZM3.96464 2.904L4.98708 3.92645C5.18532 3.16207 5.43765 2.47961 5.73202 1.90663C5.08852 2.14624 4.49322 2.48487 3.96464 2.904ZM11.4187 9.72246C12.5137 9.62096 13.5116 9.47245 14.3724 9.28806C14.4561 8.87172 14.5 8.44099 14.5 8C14.5 7.55901 14.4561 7.12828 14.3724 6.71194C13.5116 6.52755 12.5137 6.37904 11.4187 6.27753C11.4719 6.83232 11.5 7.40867 11.5 8C11.5 8.59133 11.4719 9.16768 11.4187 9.72246ZM11.2469 5.00748C12.2138 5.08891 13.1191 5.20593 13.9384 5.35306C13.2303 3.7667 11.9051 2.51622 10.268 1.90662C10.695 2.73788 11.0336 3.79953 11.2469 5.00748ZM8.48347 1.51771L8.49353 1.52737C8.7585 1.78353 9.05422 2.21456 9.32968 2.84417C9.58406 3.42562 9.80021 4.12856 9.95899 4.92219C9.32395 4.89118 8.66896 4.875 8 4.875C7.33104 4.875 6.67605 4.89118 6.04101 4.92219C6.19978 4.12856 6.41594 3.42562 6.67032 2.84417C6.94578 2.21456 7.2415 1.78353 7.50647 1.52737L7.51653 1.51771C7.67615 1.50597 7.83738 1.5 8 1.5C8.16262 1.5 8.32384 1.50597 8.48347 1.51771ZM4.75309 10.9925C3.78617 10.9111 2.88085 10.7941 2.06159 10.6469C2.76975 12.2333 4.0949 13.4838 5.73202 14.0934C5.30497 13.2621 4.96639 12.2005 4.75309 10.9925Z"
        fill="currentColor"
      />
    </svg>
  );
}
