"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 Coins({
  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}
    >
      <g clipPath="url(#clip0_1529_2727)">
        <path
          fillRule="evenodd"
          clipRule="evenodd"
          d="M1.8627 7.61014C2.83103 7.22281 4.11733 7 5.5 7C6.88267 7 8.16897 7.22281 9.1373 7.61014C9.61938 7.80297 10.0598 8.05135 10.3921 8.36552C10.7258 8.68119 11 9.11499 11 9.65V13.35C11 13.8859 10.7347 14.3259 10.3979 14.6514C10.0646 14.9735 9.62194 15.226 9.1373 15.4199C8.1672 15.8079 6.88111 16.0199 5.5 16.0001C4.11889 16.0199 2.8328 15.8079 1.8627 15.4199C1.37806 15.226 0.935392 14.9735 0.602056 14.6514C0.265315 14.3259 0 13.8859 0 13.35V9.65C0 9.11499 0.274157 8.68119 0.607948 8.36552C0.940154 8.05135 1.38062 7.80297 1.8627 7.61014ZM1.5 9.65088V9.65L1.5 9.64998C1.49997 9.64935 1.49947 9.63747 1.5142 9.60866C1.53081 9.57621 1.56658 9.52347 1.63861 9.45535C1.78713 9.31489 2.04229 9.15385 2.41979 9.00285C3.17062 8.70252 4.25931 8.5 5.5 8.5C6.74069 8.5 7.82938 8.70252 8.58021 9.00285C8.95771 9.15385 9.21287 9.31489 9.36139 9.45535C9.43342 9.52347 9.46919 9.57621 9.4858 9.60866C9.50054 9.63747 9.50003 9.64935 9.5 9.64998L9.5 9.65C9.5 9.65002 9.50002 9.65031 9.5 9.65089M1.5 11.5298V13.35C1.5 13.3588 1.50052 13.4336 1.6445 13.5728C1.79189 13.7152 2.04485 13.8772 2.41979 14.0271C3.16618 14.3257 4.25066 14.519 5.48857 14.5001L5.5 14.4999L5.51143 14.5001C6.74934 14.519 7.83382 14.3257 8.58021 14.0271C8.95515 13.8772 9.20811 13.7152 9.3555 13.5728C9.49948 13.4336 9.5 13.3588 9.5 13.35V11.5298C9.38261 11.587 9.26133 11.6402 9.1373 11.6899C8.16897 12.0772 6.88267 12.3 5.5 12.3C4.11733 12.3 2.83103 12.0772 1.8627 11.6899C1.73867 11.6402 1.61739 11.587 1.5 11.5298ZM9.5 9.65089C9.49989 9.65411 9.49857 9.66636 9.4858 9.69134C9.46919 9.72379 9.43342 9.77653 9.36139 9.84465C9.21287 9.98511 8.95771 10.1461 8.58021 10.2971C7.82938 10.5975 6.74069 10.8 5.5 10.8C4.25931 10.8 3.17062 10.5975 2.41979 10.2971C2.04229 10.1461 1.78713 9.98511 1.63861 9.84465C1.56658 9.77653 1.53081 9.72379 1.5142 9.69134C1.50143 9.66636 1.50011 9.65411 1.5 9.65088"
          fill="currentColor"
        />
        <path
          fillRule="evenodd"
          clipRule="evenodd"
          d="M6.8627 0.61014C7.83103 0.222808 9.11733 0 10.5 0C11.8827 0 13.169 0.222808 14.1373 0.61014C14.6194 0.802973 15.0598 1.05135 15.3921 1.36552C15.7258 1.68119 16 2.11499 16 2.65V6.35C16 6.90413 15.746 7.35093 15.4245 7.67984C15.1106 8.00089 14.7088 8.23745 14.3171 8.41033C13.5387 8.75385 12.6231 8.92251 12 8.92251V7.42251C12.415 7.42251 13.1243 7.29715 13.7115 7.03804C14.0025 6.90961 14.2185 6.76769 14.3518 6.63129C14.4775 6.50275 14.5 6.41311 14.5 6.35V4.52982C14.3826 4.58696 14.2613 4.64025 14.1373 4.68986C13.169 5.07719 11.8827 5.3 10.5 5.3C9.11733 5.3 7.83103 5.07719 6.8627 4.68986C6.73867 4.64025 6.61739 4.58696 6.5 4.52982V5.5H5V2.65C5 2.11499 5.27416 1.68119 5.60795 1.36552C5.94015 1.05135 6.38062 0.802973 6.8627 0.61014ZM6.5 2.65088V2.65L6.5 2.64998C6.49997 2.64935 6.49947 2.63747 6.5142 2.60866C6.53081 2.57621 6.56658 2.52347 6.63861 2.45535C6.78713 2.31489 7.04229 2.15385 7.41979 2.00285C8.17062 1.70252 9.25931 1.5 10.5 1.5C11.7407 1.5 12.8294 1.70252 13.5802 2.00285C13.9577 2.15385 14.2129 2.31489 14.3614 2.45535C14.4334 2.52347 14.4692 2.57621 14.4858 2.60866C14.5005 2.63747 14.5 2.64935 14.5 2.64998L14.5 2.65C14.5 2.65002 14.5 2.65031 14.5 2.65089M6.5 2.65088C6.50011 2.65411 6.50143 2.66636 6.5142 2.69134C6.53081 2.72379 6.56658 2.77653 6.63861 2.84465C6.78713 2.98511 7.04229 3.14615 7.41979 3.29715C8.17062 3.59748 9.25931 3.8 10.5 3.8C11.7407 3.8 12.8294 3.59748 13.5802 3.29715C13.9577 3.14615 14.2129 2.98511 14.3614 2.84465C14.4334 2.77653 14.4692 2.72379 14.4858 2.69134C14.4986 2.66636 14.4999 2.65411 14.5 2.65089"
          fill="currentColor"
        />
      </g>
      <defs>
        <clipPath id="clip0_1529_2727">
          <rect width="16" height="16" fill="white" />
        </clipPath>
      </defs>
    </svg>
  );
}
