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

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

export const Windsurf: IconComponent<WindsurfProps> = React.forwardRef<
  SVGSVGElement,
  WindsurfProps
>(function Windsurf(
  {
    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 77 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}
      >
        <path
          d="M17.2807 7.0024H17.1145C16.2398 7.00108 15.53 7.68987 15.53 8.54026V11.9795C15.53 12.6664 14.9461 13.2226 14.2514 13.2226C13.8385 13.2226 13.4264 13.0207 13.1818 12.6816L9.56849 7.6647C9.26876 7.24812 8.78107 6.99976 8.25308 6.99976C7.42953 6.99976 6.68832 7.68059 6.68832 8.52104V11.9802C6.68832 12.6671 6.10928 13.2234 5.40969 13.2234C4.99543 13.2234 4.58405 13.0213 4.33943 12.6822L0.296328 7.06864C0.205047 6.94214 0 7.00439 0 7.15936V10.1588C0 10.3105 0.0476826 10.4576 0.136934 10.5821L4.11535 16.1063C4.35029 16.4329 4.69714 16.6753 5.097 16.7633C6.09763 16.9845 7.01868 16.2355 7.01868 15.2811V11.8239C7.01868 11.1371 7.59092 10.5808 8.29732 10.5808H8.29941C8.72518 10.5808 9.12439 10.7827 9.36889 11.1219L12.9822 16.1382C13.2825 16.5554 13.7452 16.803 14.2969 16.803C15.1389 16.803 15.8604 16.1216 15.8604 15.2818V11.8233C15.8604 11.1365 16.4326 10.5802 17.139 10.5802H17.2801C17.3686 10.5802 17.4402 10.5106 17.4402 10.4245V7.15738C17.4402 7.07128 17.3686 7.00174 17.2801 7.00174L17.2807 7.0024ZM38.0234 9.59065H37.1392C37.0493 9.59065 36.9763 9.66151 36.9763 9.74895V16.6435C36.9763 16.7309 37.0493 16.8018 37.1392 16.8018H38.0234C38.1134 16.8018 38.1863 16.7309 38.1863 16.6435V9.74895C38.1863 9.66151 38.1134 9.59065 38.0234 9.59065ZM37.1099 7.00042H38.0521C38.142 7.00042 38.2148 7.07128 38.2148 7.1587V8.28462C38.2148 8.37204 38.142 8.4429 38.0521 8.4429H37.1099C37.0199 8.4429 36.947 8.37204 36.947 8.28462V7.1587C36.947 7.07128 37.0199 7.00042 37.1099 7.00042ZM43.316 9.39462C42.3222 9.39462 41.602 9.7304 41.1409 10.2212C40.993 10.3669 40.7375 10.2648 40.7375 10.0602V9.74895C40.7375 9.66151 40.6646 9.59065 40.5747 9.59065H39.7055C39.6156 9.59065 39.5426 9.66151 39.5426 9.74895V16.6435C39.5426 16.7309 39.6156 16.8018 39.7055 16.8018H40.5755C40.6654 16.8018 40.7383 16.7309 40.7383 16.6435V12.2789C40.7383 10.7662 41.0406 10.4304 42.6974 10.4304C44.3542 10.4304 44.6273 10.6967 44.6273 12.2087V16.6428C44.6273 16.7302 44.7002 16.8011 44.7902 16.8011H45.6744C45.7644 16.8011 45.8373 16.7302 45.8373 16.6428V11.8861C45.8373 10.1636 44.829 9.39329 43.3166 9.39329V9.39462H43.316ZM52.3491 10.3192C52.4969 10.4649 52.7524 10.363 52.7524 10.1582V7.15936C52.7524 7.07194 52.8253 7.00108 52.9152 7.00108H53.7851C53.875 7.00108 53.9479 7.07194 53.9479 7.15936V16.6441C53.9479 16.7315 53.875 16.8024 53.7851 16.8024H52.9152C52.8253 16.8024 52.7524 16.7315 52.7524 16.6441V16.2349C52.7613 16.0255 52.5003 15.9249 52.3491 16.0739C51.9315 16.5779 51.125 16.9977 50.0445 16.9977C48.1439 16.9977 46.9048 15.6818 46.9048 13.2313C46.9048 10.6411 48.2869 9.39462 50.0874 9.39462C51.1679 9.39462 51.9459 9.81514 52.3491 10.3192ZM48.2147 13.2028C48.2147 15.5692 48.5172 15.9195 50.4907 15.9195C52.4499 15.9195 52.7524 15.5692 52.7524 13.2028C52.7524 10.8364 52.4642 10.4721 50.4907 10.4721C48.5172 10.4721 48.2147 10.8364 48.2147 13.2028ZM59.0041 12.7557L57.579 12.518C56.5272 12.3358 56.3398 12.0279 56.3398 11.4955C56.3542 10.7668 56.6422 10.4033 58.0395 10.4033C59.3481 10.4033 59.767 10.7794 59.857 11.5914C59.8659 11.6716 59.9354 11.7332 60.0185 11.7332H60.883C60.9755 11.7332 61.0512 11.6577 61.0457 11.567C60.9619 10.1728 59.6492 9.39395 58.083 9.39395C56.3255 9.39395 55.1593 10.3039 55.1593 11.6067C55.1593 12.7968 56.1102 13.3154 57.2479 13.5253L58.8181 13.8055C59.6826 13.9598 59.9707 14.24 59.9707 14.7718C59.9707 15.6261 59.6682 15.9904 58.1846 15.9904C56.7009 15.9904 56.2908 15.5744 56.1954 14.7314C56.1865 14.6512 56.117 14.5903 56.0339 14.5903H55.164C55.0726 14.5903 54.9984 14.6638 55.0005 14.7525C55.042 16.2547 56.4426 16.9991 58.1117 16.9991C59.9265 16.9991 61.1793 16.089 61.1793 14.7161C61.1793 13.5121 60.2283 12.9657 59.0041 12.7557ZM65.2999 15.9625C66.9131 15.9625 67.2156 15.6269 67.2156 14.1141V9.75093C67.2156 9.66351 67.2885 9.59265 67.3784 9.59265H68.2626C68.3526 9.59265 68.4255 9.66351 68.4255 9.75093V16.6454C68.4255 16.7328 68.3526 16.8037 68.2626 16.8037H67.3784C67.2885 16.8037 67.2156 16.7328 67.2156 16.6454V16.3448C67.2121 16.1308 66.9839 16.0241 66.8266 16.1739C66.3661 16.6639 65.646 16.9998 64.6807 16.9998C63.1969 16.9998 62.1887 16.2295 62.1887 14.5068V9.75027C62.1887 9.66285 62.2616 9.59199 62.3515 9.59199H63.2358C63.3257 9.59199 63.3986 9.66285 63.3986 9.75027V14.1844C63.3986 15.6963 63.6868 15.9625 65.2999 15.9625ZM75.5007 9.59065V8.6661C75.5007 8.30249 75.8038 8.00777 76.1778 8.00777H76.8359C76.9258 8.00777 76.9987 7.93691 76.9987 7.84949V7.15804C76.9987 7.07062 76.9258 6.99976 76.8359 6.99976H76.3795C75.083 6.99976 74.2908 7.6998 74.2908 8.90452V9.59065H73.3323C72.4828 9.59197 71.816 9.70524 71.3711 10.2212C71.2076 10.3715 70.9821 10.2589 70.9821 10.0404V9.74961C70.9821 9.66219 70.9092 9.59131 70.8193 9.59131H69.935C69.8451 9.59131 69.7722 9.66219 69.7722 9.74961V16.6441C69.7722 16.7315 69.8451 16.8024 69.935 16.8024H70.8193C70.9092 16.8024 70.9821 16.7315 70.9821 16.6441V12.322C70.9821 10.8933 71.3568 10.5576 72.9699 10.5576H74.2908V16.6447C74.2908 16.7322 74.3637 16.803 74.4536 16.803H75.3379C75.4278 16.803 75.5007 16.7322 75.5007 16.6447V10.5576H76.8372C76.9271 10.5576 77 10.4868 77 10.3993V9.75027C77 9.66285 76.9271 9.59199 76.8372 9.59199H75.5007V9.59065ZM32.0532 15.0036C32.0846 15.1301 32.2011 15.2195 32.3346 15.2195H32.3352C32.4681 15.2195 32.5839 15.1314 32.6158 15.0063L34.6439 7.1203C34.6623 7.04943 34.7277 6.99976 34.8026 6.99976H35.815C35.9232 6.99976 36.0023 7.0991 35.9751 7.20109L33.4238 16.6871C33.4055 16.754 33.3434 16.8011 33.2719 16.8011H31.466C31.3931 16.8011 31.3298 16.7528 31.3113 16.6846L29.192 8.74953C29.1594 8.62569 29.0442 8.53894 28.912 8.53894H28.8937C28.7621 8.53894 28.6471 8.62569 28.6137 8.74953L26.4951 16.6846C26.4766 16.7534 26.4132 16.8011 26.3403 16.8011H24.5345C24.4629 16.8011 24.4002 16.754 24.3825 16.6871L21.8313 7.20109C21.8041 7.0991 21.8831 6.99976 21.9915 6.99976H23.0038C23.0786 6.99976 23.1441 7.04943 23.1624 7.1203L25.1898 15.0063C25.2218 15.1314 25.337 15.2195 25.4705 15.2195C25.604 15.2195 25.7205 15.1301 25.7519 15.0036L27.7008 7.12162C27.7186 7.0501 27.7839 6.99976 27.8595 6.99976H29.9461C30.0218 6.99976 30.0871 7.0501 30.1049 7.12162L32.0532 15.0036Z"
          fill="currentColor"
          fillRule="evenodd"
          clipRule="evenodd"
        />
      </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}
      >
        <path
          d="M23.7787 5.00379H23.55C22.3463 5.0019 21.3695 5.98559 21.3695 7.20011V12.1121C21.3695 13.093 20.566 13.8875 19.6098 13.8875C19.0417 13.8875 18.4746 13.599 18.138 13.1147L13.1667 5.94967C12.7542 5.3547 12.083 5 11.3564 5C10.223 5 9.20307 5.97236 9.20307 7.1727V12.113C9.20307 13.0939 8.40623 13.8884 7.44346 13.8884C6.87349 13.8884 6.30724 13.5999 5.97068 13.1157L0.407794 5.09743C0.28217 4.91581 0 5.00569 0 5.22703V9.5109C0 9.72752 0.0656303 9.93752 0.188421 10.1153L5.66319 18.0049C5.98663 18.4712 6.46382 18.8174 7.01408 18.9433C8.39123 19.2592 9.65869 18.1894 9.65869 16.8264V11.8888C9.65869 10.908 10.4462 10.1134 11.4183 10.1134H11.4211C12.007 10.1134 12.5564 10.4019 12.8929 10.8862L17.8652 18.0503C18.2787 18.6462 18.9152 19 19.6745 19C20.8332 19 21.826 18.0267 21.826 16.8273V11.8879C21.826 10.907 22.6135 10.1125 23.5856 10.1125H23.7797C23.9015 10.1125 24 10.0132 24 9.89021V5.22607C24 5.10312 23.9015 5.00379 23.7797 5.00379H23.7787Z"
          fill="currentColor"
        />
      </svg>
    );
  }

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

Windsurf.displayName = "Windsurf";

Windsurf.metadata = {
  name: "Windsurf",
  category: "wordmark/ai",
  tags: ["windsurf", "icon"],
  description: "Windsurf icon from wordmark/ai category",
  type: ["stroke", "icon"],
} as IconMetadata;

export default Windsurf;
