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

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

export const Raycast: IconComponent<RaycastProps> = React.forwardRef<
  SVGSVGElement,
  RaycastProps
>(function Raycast(
  {
    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 93 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_640)">
          <path
            d="M6 15.4911V17.9951L0 11.9951L1.251 10.7441L6 15.4901V15.4911ZM8.504 17.9951H6L12 23.9951L13.251 22.7441L8.504 17.9951ZM22.744 13.2481L23.997 11.9951L11.997 -0.00488281L10.747 1.25112L15.494 5.99812H12.626L9.312 2.69112L8.061 3.94212L10.121 6.00312H8.681V15.3171H17.995V13.8771L20.056 15.9371L21.307 14.6871L17.995 11.3731V8.50312L22.744 13.2481ZM6.626 5.37412L5.37 6.62712L6.714 7.97012L7.966 6.71812L6.626 5.37412ZM17.282 16.0301L16.03 17.2831L17.373 18.6271L18.626 17.3741L17.282 16.0301ZM3.939 8.06012L2.686 9.31512L6 12.6271V10.1211L3.94 8.06112L3.939 8.06012ZM13.88 18.0001H11.374L14.687 21.3141L15.94 20.0611L13.88 18.0001Z"
            fill="#ff6363"
            fillRule="evenodd"
            clipRule="evenodd"
          />
          <path
            d="M90.987 17.9802C90.179 17.9802 89.547 17.7612 89.097 17.3212C88.645 16.8812 88.419 16.2712 88.419 15.4962V10.6962H86.969V8.89919H88.427L88.687 6.49919H90.394V8.89919H92.621V10.6992H90.394V15.2372C90.3891 15.4844 90.481 15.7238 90.65 15.9042C90.7368 15.9966 90.8424 16.0693 90.9597 16.1173C91.0771 16.1652 91.2034 16.1874 91.33 16.1822H92.62V17.9812H90.987V17.9802ZM82.268 18.1502C81.191 18.1502 80.324 17.8932 79.668 17.3802C79.0162 16.8703 78.5693 16.1431 78.409 15.3312H80.552C80.645 15.6432 80.853 15.9082 81.134 16.0732C81.478 16.2722 81.871 16.3692 82.268 16.3532C83.411 16.3532 83.985 16.0332 83.985 15.4162C83.985 15.1082 83.805 14.8722 83.446 14.7102C83.028 14.5319 82.5913 14.4014 82.144 14.3212C81.6253 14.2222 81.1119 14.0967 80.606 13.9452C80.0898 13.7927 79.6318 13.4877 79.292 13.0702C78.936 12.6432 78.755 12.0832 78.755 11.3892C78.7493 11.0238 78.828 10.6619 78.985 10.3319C79.142 10.0018 79.373 9.71242 79.66 9.48619C80.266 8.98119 81.106 8.72819 82.18 8.72919C83.254 8.72919 84.1 8.96919 84.74 9.44819C85.3688 9.92435 85.8011 10.6146 85.955 11.3882H83.809C83.581 10.8172 83.039 10.5312 82.185 10.5312C81.268 10.5312 80.812 10.8182 80.812 11.3912C80.8133 11.5226 80.8499 11.6513 80.9177 11.7638C80.9856 11.8764 81.0824 11.9687 81.198 12.0312C81.491 12.2112 81.818 12.3272 82.158 12.3762C82.584 12.4482 83.005 12.5462 83.418 12.6672C83.848 12.7902 84.268 12.9402 84.678 13.1182C85.077 13.2992 85.415 13.5932 85.649 13.9632C85.921 14.3982 86.056 14.9052 86.038 15.4182C86.0465 15.7999 85.9639 16.1781 85.7969 16.5214C85.63 16.8647 85.3835 17.1632 85.078 17.3922C84.439 17.8962 83.502 18.1492 82.268 18.1502ZM75.88 9.63619C75.22 9.04319 74.294 8.74619 73.107 8.74619C72.157 8.74619 71.362 9.00119 70.721 9.51219C70.0836 10.0088 69.6325 10.7062 69.441 11.4912H71.467C71.57 11.1942 71.767 10.9382 72.027 10.7632C72.3429 10.5505 72.7185 10.4443 73.099 10.4602C73.5758 10.4338 74.0454 10.586 74.416 10.8872C74.5792 11.0391 74.7069 11.2251 74.7898 11.432C74.8728 11.6389 74.9091 11.8616 74.896 12.0842V12.5202H72.586C71.515 12.5202 70.676 12.7862 70.072 13.3202C69.7811 13.5688 69.5488 13.8788 69.392 14.2279C69.2351 14.577 69.1576 14.9566 69.165 15.3392C69.1526 15.7186 69.2216 16.0963 69.3671 16.447C69.5127 16.7976 69.7315 17.1131 70.009 17.3722C70.573 17.9062 71.319 18.1722 72.249 18.1722C72.8253 18.1856 73.3956 18.0532 73.907 17.7872C74.318 17.5872 74.666 17.2772 74.912 16.8912H74.995L75.155 18.0112H76.87V12.0912C76.871 11.0512 76.541 10.2332 75.88 9.63619ZM74.905 14.4882C74.917 14.7576 74.8695 15.0263 74.7658 15.2752C74.662 15.5241 74.5047 15.747 74.305 15.9282C73.908 16.2812 73.366 16.4582 72.678 16.4582C72.178 16.4582 71.793 16.3442 71.529 16.1182C71.4005 16.0141 71.2977 15.8818 71.2283 15.7317C71.159 15.5816 71.125 15.4175 71.129 15.2522C71.129 14.4522 71.652 14.0552 72.679 14.0552H74.905V14.4882ZM64.021 18.1702C62.721 18.1702 61.683 17.7522 60.904 16.9182C60.128 16.0842 59.736 14.9312 59.736 13.4562C59.736 11.9802 60.126 10.8322 60.9 9.99619C61.674 9.16119 62.716 8.74619 64.021 8.74619C65.081 8.74619 65.961 9.02819 66.658 9.59519C67.3425 10.1405 67.8302 10.8943 68.047 11.7422H66.082C65.8894 11.3663 65.5928 11.0537 65.2276 10.8415C64.8624 10.6293 64.444 10.5265 64.022 10.5452C63.7019 10.5338 63.3835 10.5965 63.0916 10.7283C62.7997 10.8601 62.5421 11.0575 62.339 11.3052C61.913 11.8142 61.699 12.5312 61.699 13.4552C61.699 14.3802 61.913 15.0982 62.339 15.6072C62.5416 15.8555 62.7988 16.0536 63.0905 16.1862C63.3823 16.3187 63.7007 16.382 64.021 16.3712C64.4432 16.389 64.8616 16.2855 65.2267 16.0728C65.5918 15.8601 65.8883 15.5472 66.081 15.1712H68.047C67.83 16.02 67.342 16.7749 66.657 17.3212C65.963 17.8862 65.084 18.1702 64.021 18.1702ZM52.43 21.4322L53.801 18.0022L50.118 8.92019H52.261L54.747 15.3472H54.829L57.319 8.92019H59.461L54.486 21.4322H52.43ZM48.267 9.63619C47.607 9.04219 46.682 8.74619 45.493 8.74619C44.544 8.74619 43.749 9.00119 43.107 9.51219C42.4723 10.0095 42.0247 10.707 41.837 11.4912H43.861C43.964 11.1942 44.16 10.9382 44.421 10.7632C44.7371 10.551 45.1126 10.4449 45.493 10.4602C46.049 10.4602 46.489 10.6032 46.809 10.8872C46.9726 11.0388 47.1004 11.2248 47.1834 11.4318C47.2664 11.6388 47.3025 11.8616 47.289 12.0842V12.5202H44.969C43.903 12.5202 43.065 12.7862 42.456 13.3202C42.1645 13.5684 41.9317 13.8783 41.7745 14.2275C41.6173 14.5766 41.5396 14.9564 41.547 15.3392C41.5359 15.7174 41.6056 16.0936 41.7513 16.4428C41.897 16.7919 42.1154 17.1061 42.392 17.3642C42.955 17.8982 43.702 18.1642 44.632 18.1642C45.2077 18.1776 45.7773 18.0452 46.288 17.7792C46.7 17.5792 47.048 17.2692 47.294 16.8832H47.376L47.546 18.0032H49.258V12.0832C49.258 11.0482 48.928 10.2332 48.268 9.63619H48.267ZM47.289 14.4882C47.301 14.7576 47.2535 15.0263 47.1498 15.2752C47.046 15.5241 46.8887 15.747 46.689 15.9282C46.293 16.2812 45.749 16.4582 45.061 16.4582C44.561 16.4582 44.176 16.3442 43.911 16.1182C43.7828 16.0138 43.6802 15.8815 43.6108 15.7315C43.5415 15.5814 43.5074 15.4175 43.511 15.2522C43.518 14.4562 44.034 14.0572 45.061 14.0552H47.289V14.4882ZM37.152 13.4562C37.458 13.3752 37.753 13.2592 38.032 13.1102C38.358 12.9322 38.663 12.7172 38.941 12.4702C39.277 12.1602 39.536 11.7772 39.698 11.3502C39.892 10.8482 39.988 10.3142 39.981 9.77619C39.981 8.63319 39.616 7.71819 38.887 7.03019C38.157 6.34219 37.207 6.00019 36.039 6.00319H31.067V18.0032H33.21V13.5492H34.835L37.923 18.0002H40.323L37.153 13.4552L37.152 13.4562ZM33.21 11.6502V7.89019H35.864C36.472 7.89019 36.952 8.05019 37.304 8.38419C37.656 8.71919 37.835 9.17619 37.835 9.77019C37.835 10.3642 37.658 10.8282 37.301 11.1592C36.909 11.4992 36.401 11.6762 35.881 11.6502H33.21Z"
            fill="currentColor"
          />
        </g>
        <defs>
          <clipPath id="undefined-clip0_2039_640">
            <path fill="#fff" d="M0 0H93V24H0z" />
          </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_633)">
          <path
            d="M6 15.4963V18L0 12L1.25143 10.7486L6 15.498V15.4963ZM8.50371 18H6L12 24L13.2514 22.7486L8.50371 18ZM22.7443 13.2531L23.9966 12L11.9966 0L10.7469 1.25657L15.4946 6.00343H12.6257L9.312 2.69657L8.06057 3.948L10.122 6.00857H8.682V15.3223H17.9949V13.8823L20.0563 15.9429L21.3077 14.6914L17.9949 11.3777V8.50886L22.7443 13.2531ZM6.62571 5.37943L5.37 6.63257L6.714 7.97486L7.96629 6.72343L6.62571 5.37943ZM17.2817 16.0354L16.0303 17.2886L17.3726 18.6326L18.6257 17.3794L17.2817 16.0354ZM3.93943 8.06571L2.68629 9.31886L6 12.6326V10.1271L3.93943 8.06571ZM13.8789 18.0051H11.3726L14.6863 21.3189L15.9394 20.0657L13.8789 18.0051Z"
            fill="#ff6363"
            fillRule="evenodd"
            clipRule="evenodd"
          />
        </g>
        <defs>
          <clipPath id="undefined-clip0_2039_633">
            <path fill="#fff" d="M0 0H24V24H0z" />
          </clipPath>
        </defs>
      </svg>
    );
  }

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

Raycast.displayName = "Raycast";

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

export default Raycast;
