import * as React from "react";
import type { IconProps, IconMetadata, IconComponent } from "../../types";

interface ClerkProps extends IconProps {
  type?: "wordmark" | "icon";
}

export const Clerk: IconComponent<ClerkProps> = React.forwardRef<
  SVGSVGElement,
  ClerkProps
>(function Clerk(
  {
    color = "currentColor",
    fill,
    size = 24,
    strokeWidth,
    strokeLinecap,
    strokeLinejoin,
    strokeDasharray,
    opacity,
    className,
    type = "icon",
    ...props
  },
  forwardedRef,
) {
  if (type === "wordmark") {
    return (
      <svg
        width={size}
        height={size}
        viewBox="0 0 83 24"
        fill="none"
        xmlns="http://www.w3.org/2000/svg"
        className={className}
        strokeWidth={strokeWidth}
        strokeLinecap={strokeLinecap}
        strokeLinejoin={strokeLinejoin}
        strokeDasharray={strokeDasharray}
        opacity={opacity}
        {...props}
        ref={forwardedRef}
      >
        <g clipPath="url(#undefined-clip0_2039_475)">
          <path
            d="M12.073 15.75C14.157 15.75 15.846 14.071 15.846 12 15.846 9.929 14.157 8.25 12.073 8.25 9.989 8.25 8.3 9.929 8.3 12 8.3 14.071 9.989 15.75 12.073 15.75ZM18.871 20.879C19.192 21.198 19.159 21.726 18.782 21.977 16.863 23.255 14.555 24 12.072 24 9.589 24 7.281 23.255 5.362 21.977 4.985 21.726 4.953 21.198 5.274 20.879L8.031 18.138C8.28 17.891 8.666 17.851 8.98 18.011 9.907 18.483 10.958 18.75 12.072 18.75 13.186 18.75 14.237 18.483 15.164 18.011 15.478 17.851 15.864 17.891 16.113 18.138L18.871 20.879Z"
            fill="#9785ff"
          />
          <path
            opacity=".6"
            d="M18.7827 2.02275C19.1599 2.27385 19.1921 2.80207 18.8711 3.12112L16.1141 5.86158C15.8649 6.10927 15.4783 6.14839 15.1647 5.98868C14.2373 5.51644 13.1863 5.25 12.0727 5.25C8.32218 5.25 5.2818 8.27205 5.2818 12C5.2818 13.1069 5.54985 14.1516 6.02495 15.0734C6.18563 15.3852 6.14626 15.7694 5.89708 16.0171L3.14002 18.7576C2.81903 19.0766 2.28762 19.0445 2.03499 18.6697C0.749657 16.7623 0 14.4682 0 12C0 5.37258 5.40512 0 12.0727 0C14.5558 0 16.8638 0.745147 18.7827 2.02275Z"
            fill="#9785ff"
          />
          <path
            d="M75.7601 15.9367C75.7722 15.9243 75.788 15.9173 75.8054 15.9173C75.8265 15.9173 75.8453 15.9281 75.8567 15.946L79.4347 21.6616C79.4694 21.7165 79.5298 21.75 79.5947 21.75H82.8113C82.9592 21.75 83.0497 21.5886 82.972 21.4637L78.063 13.592C78.0192 13.5209 78.0275 13.4292 78.0841 13.3673L82.8128 8.181C82.923 8.06047 82.837 7.86757 82.6732 7.86757H79.3178C79.265 7.86757 79.2144 7.88955 79.1789 7.92833L73.7071 13.8566C73.5908 13.9826 73.3795 13.9009 73.3795 13.7299V2.4375C73.3795 2.33395 73.295 2.25 73.1909 2.25H70.3613C70.2571 2.25 70.1727 2.33395 70.1727 2.4375V21.5625C70.1727 21.6661 70.2571 21.75 70.3613 21.75H73.1909C73.295 21.75 73.3795 21.6661 73.3795 21.5625V18.553C73.3795 18.5056 73.3975 18.4599 73.43 18.4252L75.7601 15.9367ZM39.4251 2.4375C39.4251 2.33395 39.5095 2.25 39.6137 2.25H42.4432C42.5474 2.25 42.6318 2.33395 42.6318 2.4375V21.5625C42.6318 21.6661 42.5474 21.75 42.4432 21.75H39.6137C39.5095 21.75 39.4251 21.6661 39.4251 21.5625V2.4375ZM35.4319 17.6934C35.3567 17.6289 35.2443 17.6338 35.1721 17.7015C34.7311 18.1153 34.2146 18.4462 33.6487 18.6771C33.0278 18.9305 32.3604 19.0581 31.6871 19.0521C31.1185 19.0689 30.5525 18.9722 30.0238 18.7681C29.4951 18.5639 29.015 18.2567 28.613 17.8652C27.8827 17.1242 27.4624 16.0661 27.4624 14.8049C27.4624 12.2801 29.1523 10.5532 31.6871 10.5532C32.3669 10.5439 33.0406 10.6807 33.6598 10.9539C34.2211 11.2016 34.7252 11.5558 35.1428 11.995C35.2141 12.0702 35.3327 12.0789 35.4114 12.0112L37.3217 10.3683C37.3997 10.3012 37.4092 10.1839 37.3404 10.1075C35.9035 8.5116 33.6524 7.6875 31.5118 7.6875C27.2018 7.6875 24.1456 10.5773 24.1456 14.8289C24.1456 16.9317 24.9052 18.7024 26.186 19.9527C27.4669 21.203 29.2916 21.9375 31.3972 21.9375C34.0373 21.9375 36.1622 20.9312 37.408 19.6403C37.4812 19.5645 37.4731 19.4439 37.3931 19.3753L35.4319 17.6934ZM58.2188 15.7408C58.2083 15.8347 58.1279 15.905 58.0329 15.905H48.1208C48.0004 15.905 47.9106 16.0159 47.942 16.1315C48.4352 17.9485 49.9054 19.048 51.9122 19.048C52.5887 19.0621 53.2592 18.9238 53.8721 18.6437C54.4431 18.3827 54.9496 18.0051 55.3579 17.5371C55.4073 17.4805 55.4933 17.4721 55.5511 17.5202L57.5439 19.2447C57.6201 19.3107 57.6308 19.4249 57.5653 19.5016C56.3622 20.9124 54.4129 21.9375 51.7378 21.9375C47.6225 21.9375 44.5182 19.1048 44.5182 14.8011C44.5182 12.6898 45.2495 10.9193 46.4684 9.66908C47.1118 9.02618 47.8832 8.5188 48.7347 8.17822C49.5863 7.83765 50.5002 7.67108 51.4202 7.68878C55.5913 7.68878 58.2886 10.6045 58.2886 14.6306C58.2834 15.0016 58.2601 15.3721 58.2188 15.7408ZM48.0016 13.1278C47.9666 13.2436 48.0565 13.3563 48.1781 13.3563H54.7688C54.8906 13.3563 54.9806 13.2429 54.9468 13.1266C54.4975 11.5812 53.3579 10.5499 51.5879 10.5499C51.0673 10.5335 50.5492 10.6272 50.0689 10.8244C49.5889 11.0218 49.1578 11.3181 48.8057 11.693C48.4353 12.1105 48.1615 12.5998 48.0016 13.1278ZM68.0956 7.68952C68.2006 7.6884 68.2863 7.7727 68.2863 7.87702V11.026C68.2863 11.1352 68.1929 11.2211 68.0834 11.2131C67.7776 11.1905 67.4885 11.1714 67.2991 11.1714C64.8308 11.1714 63.3818 12.8981 63.3818 15.1646V21.5625C63.3818 21.6661 63.2973 21.75 63.1931 21.75H60.3636C60.2595 21.75 60.1749 21.6661 60.1749 21.5625V8.07172C60.1749 7.96815 60.2595 7.88422 60.3636 7.88422H63.1931C63.2973 7.88422 63.3818 7.96815 63.3818 8.07172V9.96525C63.3818 9.97597 63.3905 9.9846 63.4012 9.9846C63.4074 9.9846 63.4132 9.98167 63.4169 9.9768C64.5229 8.5086 66.1555 7.69193 67.8801 7.69193L68.0956 7.68952Z"
            fill="currentColor"
            fillRule="evenodd"
            clipRule="evenodd"
          />
        </g>
        <defs>
          <clipPath id="undefined-clip0_2039_475">
            <path fill="#fff" d="M0 0H83V24H0z" />
          </clipPath>
        </defs>
      </svg>
    );
  }

  if (type === "icon") {
    return (
      <svg
        width={size}
        height={size}
        viewBox="0 0 24 24"
        fill="none"
        xmlns="http://www.w3.org/2000/svg"
        className={className}
        strokeWidth={strokeWidth}
        strokeLinecap={strokeLinecap}
        strokeLinejoin={strokeLinejoin}
        strokeDasharray={strokeDasharray}
        opacity={opacity}
        {...props}
        ref={forwardedRef}
      >
        <g clipPath="url(#undefined-clip0_2039_468)">
          <path
            d="M21.4701 20.829L18.5891 17.948C18.4985 17.8578 18.3804 17.8005 18.2535 17.7853C18.1267 17.7701 17.9983 17.7978 17.8891 17.864C16.8206 18.5086 15.5964 18.8492 14.3486 18.8492C13.1007 18.8492 11.8765 18.5086 10.8081 17.864C10.6986 17.7985 10.5704 17.7712 10.4437 17.7864C10.317 17.8016 10.1989 17.8584 10.1081 17.948L7.22705 20.829C7.13677 20.9169 7.07781 21.032 7.05921 21.1566C7.0406 21.2812 7.06338 21.4085 7.12405 21.519C7.16498 21.5925 7.22167 21.656 7.29005 21.705C9.3408 23.1959 11.8111 23.999 14.3466 23.999C16.882 23.999 19.3523 23.1959 21.4031 21.705C21.4711 21.6559 21.5277 21.5927 21.569 21.5197C21.6102 21.4467 21.6352 21.3656 21.6421 21.282C21.648 21.1985 21.6357 21.1147 21.606 21.0365C21.5763 20.9583 21.5299 20.8874 21.4701 20.829ZM21.4721 3.16097L18.5921 6.04097C18.5017 6.13185 18.3834 6.18959 18.2562 6.20484C18.1289 6.22008 18.0003 6.19194 17.8911 6.12497C16.4003 5.22651 14.6237 4.9286 12.9214 5.29163C11.2191 5.65467 9.71855 6.65149 8.72405 8.07997C7.96921 9.16704 7.54483 10.4492 7.50205 11.772C7.45814 13.0947 7.79779 14.4019 8.48005 15.536C8.54595 15.6451 8.57357 15.7731 8.55854 15.8997C8.54351 16.0263 8.48668 16.1443 8.39705 16.235L5.51605 19.115C5.45839 19.1739 5.38855 19.2196 5.31141 19.2488C5.23427 19.278 5.15169 19.29 5.06943 19.284C4.98716 19.278 4.9072 19.2542 4.83511 19.2141C4.76303 19.174 4.70055 19.1187 4.65205 19.052C2.84754 16.5722 2.06156 13.4954 2.45569 10.4541C2.84981 7.41267 4.39408 4.63784 6.77105 2.69997C8.82334 1.02502 11.3725 0.0768825 14.0205 0.00361315C16.6686 -0.0696562 19.2663 0.736072 21.4081 2.29497C21.4749 2.3435 21.5303 2.40606 21.5704 2.47827C21.6104 2.55048 21.6342 2.63059 21.6401 2.71297C21.6462 2.79536 21.6343 2.87809 21.6053 2.95545C21.5763 3.0328 21.5308 3.10293 21.4721 3.16097ZM14.3541 15.422C14.8041 15.422 15.2497 15.3333 15.6655 15.1611C16.0813 14.9889 16.4591 14.7364 16.7773 14.4182C17.0955 14.1 17.348 13.7222 17.5202 13.3064C17.6924 12.8906 17.7811 12.445 17.7811 11.995C17.7811 11.5449 17.6924 11.0993 17.5202 10.6835C17.348 10.2677 17.0955 9.88994 16.7773 9.57171C16.4591 9.25349 16.0813 9.00106 15.6655 8.82883C15.2497 8.65661 14.8041 8.56797 14.3541 8.56797C13.4452 8.56797 12.5735 8.92903 11.9308 9.57171C11.2881 10.2144 10.9271 11.0861 10.9271 11.995C10.9271 12.9039 11.2881 13.7755 11.9308 14.4182C12.5735 15.0609 13.4452 15.422 14.3541 15.422Z"
            fill="currentColor"
          />
        </g>
        <defs>
          <clipPath id="undefined-clip0_2039_468">
            <path fill="#fff" d="M0 0H24V24H0z" />
          </clipPath>
        </defs>
      </svg>
    );
  }

  if (type === "icon") {
    return (
      <svg
        width={size}
        height={size}
        viewBox="0 0 24 24"
        fill="none"
        xmlns="http://www.w3.org/2000/svg"
        className={className}
        strokeWidth={strokeWidth}
        strokeLinecap={strokeLinecap}
        strokeLinejoin={strokeLinejoin}
        strokeDasharray={strokeDasharray}
        opacity={opacity}
        {...props}
        ref={forwardedRef}
      >
        <g clipPath="url(#undefined-clip0_2062_2081)">
          <path
            d="M21.47 20.829L18.589 17.948C18.4985 17.8578 18.3804 17.8005 18.2535 17.7853C18.1266 17.7701 17.9983 17.7978 17.889 17.864C16.8205 18.5086 15.5964 18.8492 14.3485 18.8492C13.1006 18.8492 11.8765 18.5086 10.808 17.864C10.6985 17.7985 10.5703 17.7712 10.4436 17.7864C10.317 17.8016 10.1989 17.8584 10.108 17.948L7.227 20.829C7.13672 20.9169 7.07776 21.032 7.05915 21.1566C7.04055 21.2812 7.06333 21.4085 7.124 21.519C7.16493 21.5925 7.22162 21.656 7.29 21.705C9.34075 23.1959 11.811 23.999 14.3465 23.999C16.882 23.999 19.3522 23.1959 21.403 21.705C21.4711 21.6559 21.5277 21.5927 21.5689 21.5197C21.6102 21.4467 21.6351 21.3656 21.642 21.282C21.648 21.1985 21.6357 21.1147 21.606 21.0365C21.5762 20.9583 21.5299 20.8874 21.47 20.829ZM21.472 3.16097L18.592 6.04097C18.5017 6.13185 18.3833 6.18959 18.2561 6.20484C18.1289 6.22008 18.0002 6.19194 17.891 6.12497C16.4002 5.22651 14.6236 4.9286 12.9213 5.29163C11.219 5.65467 9.7185 6.65149 8.724 8.07997C7.96916 9.16704 7.54478 10.4492 7.502 11.772C7.45809 13.0947 7.79774 14.4019 8.48 15.536C8.5459 15.6451 8.57352 15.7731 8.55849 15.8997C8.54345 16.0263 8.48663 16.1443 8.397 16.235L5.516 19.115C5.45833 19.1739 5.38849 19.2196 5.31136 19.2488C5.23422 19.278 5.15164 19.29 5.06937 19.284C4.98711 19.278 4.90715 19.2542 4.83506 19.2141C4.76297 19.174 4.7005 19.1187 4.652 19.052C2.84749 16.5722 2.06151 13.4954 2.45563 10.4541C2.84975 7.41267 4.39403 4.63784 6.771 2.69997C8.82329 1.02502 11.3725 0.0768825 14.0205 0.00361315C16.6685 -0.0696562 19.2662 0.736072 21.408 2.29497C21.4748 2.3435 21.5302 2.40606 21.5703 2.47827C21.6104 2.55048 21.6342 2.63059 21.64 2.71297C21.6461 2.79536 21.6343 2.87809 21.6053 2.95545C21.5763 3.0328 21.5308 3.10293 21.472 3.16097ZM14.354 15.422C14.804 15.422 15.2497 15.3333 15.6655 15.1611C16.0812 14.9889 16.459 14.7364 16.7773 14.4182C17.0955 14.1 17.3479 13.7222 17.5201 13.3064C17.6924 12.8906 17.781 12.445 17.781 11.995C17.781 11.5449 17.6924 11.0993 17.5201 10.6835C17.3479 10.2677 17.0955 9.88994 16.7773 9.57171C16.459 9.25349 16.0812 9.00106 15.6655 8.82883C15.2497 8.65661 14.804 8.56797 14.354 8.56797C13.4451 8.56797 12.5734 8.92903 11.9307 9.57171C11.2881 10.2144 10.927 11.0861 10.927 11.995C10.927 12.9039 11.2881 13.7755 11.9307 14.4182C12.5734 15.0609 13.4451 15.422 14.354 15.422Z"
            fill="#111"
          />
        </g>
        <defs>
          <clipPath id="undefined-clip0_2062_2081">
            <path fill="#fff" d="M0 0H24V24H0z" />
          </clipPath>
        </defs>
      </svg>
    );
  }

  console.error(`Clerk doesn't support ${type}`);
  return null;
});

Clerk.displayName = "Clerk";

Clerk.metadata = {
  name: "Clerk",
  category: "wordmark/software",
  tags: ["clerk", "icon"],
  description: "Clerk icon from wordmark/software category",
  type: ["stroke", "icon"],
} as IconMetadata;

export default Clerk;
