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

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

export const PerplexityAI: IconComponent<PerplexityAIProps> = React.forwardRef<
  SVGSVGElement,
  PerplexityAIProps
>(function PerplexityAI(
  {
    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 95 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="M6.04267 2.52002L11.4257 7.49432V2.53148H12.4736V7.51658L17.8808 2.52002V8.19146H20.1008V16.372H17.8876V21.4221L12.4736 16.6515V21.4769H11.4257V16.7302L6.04877 21.48V16.372H3.82871V8.19146H6.04267V2.52002ZM10.6357 9.22958H4.87652V15.3339H6.04745V13.4083L10.6357 9.22958ZM7.09658 13.869V19.1635L11.4257 15.3393V9.92528L7.09658 13.869ZM12.5037 15.2887V9.92018L16.8341 13.8641V16.372H16.8397V19.1095L12.5037 15.2887ZM17.8876 15.3339H19.0529V9.22958H13.3366L17.8876 13.3651V15.3339ZM16.8329 8.19146V4.9079L13.2795 8.19146H16.8329ZM10.6439 8.19146H7.09054V4.9079L10.6439 8.19146Z"
          fill="#20808d"
          fillRule="evenodd"
          clipRule="evenodd"
        />
        <path
          d="M45.9901 8.06692H46.6554V9.442H45.7942C45.1193 9.442 44.6159 9.60484 44.2823 9.93148C43.9506 10.2571 43.7838 10.7927 43.7838 11.5371V16.046H42.4241V8.0983H43.7838V9.36652C43.7838 9.4381 43.8197 9.47344 43.8895 9.47344C43.9293 9.47344 43.9593 9.4636 43.9807 9.44302C44.002 9.42238 44.0204 9.38218 44.0418 9.32038C44.3036 8.48572 44.9544 8.06788 45.9911 8.06788H45.9901V8.06692ZM55.0345 9.77062C55.3914 10.4072 55.5708 11.1742 55.5708 12.0707C55.5708 12.9671 55.3924 13.7342 55.0345 14.3707C54.6766 15.0073 54.2131 15.4839 53.6438 15.7998C53.0746 16.1156 52.4626 16.2735 51.808 16.2735C50.5181 16.2735 49.6114 15.7537 49.0877 14.714C49.0479 14.6326 48.9965 14.5914 48.9364 14.5914C48.8762 14.5914 48.8452 14.6218 48.8452 14.6836V18.9483H47.4855V8.09728H48.8452V9.45772C48.8452 9.5185 48.8753 9.54994 48.9364 9.54994C48.9974 9.54994 49.0469 9.50968 49.0877 9.4273C49.6114 8.38762 50.5181 7.86778 51.808 7.86778C52.4626 7.86778 53.0746 8.0257 53.6438 8.34154C54.2131 8.65738 54.6757 9.13402 55.0345 9.77062ZM54.2121 12.0707C54.2121 11.133 53.9629 10.4022 53.4644 9.87754C52.9659 9.35278 52.3093 9.09088 51.4918 9.09088C50.6742 9.09088 50.0177 9.35374 49.5192 9.87754C49.0198 10.4022 48.8375 11.1339 48.8375 12.0707C48.8375 13.0074 49.0207 13.7391 49.5192 14.2638C50.0177 14.7896 50.6752 15.0504 51.4918 15.0504C52.3084 15.0504 52.9659 14.7876 53.4644 14.2638C53.9629 13.74 54.2121 13.0074 54.2121 12.0707ZM32.1355 9.78238C32.4924 10.4189 32.6718 11.186 32.6718 12.0824C32.6718 12.9789 32.4934 13.7459 32.1355 14.3825C31.7776 15.0191 31.3141 15.4958 30.7448 15.8115C30.1755 16.1274 29.5636 16.2853 28.909 16.2853C27.6192 16.2853 26.7123 15.7655 26.1887 14.7258C26.1489 14.6444 26.0975 14.6032 26.0374 14.6032C25.9772 14.6032 25.9462 14.6336 25.9462 14.6954V18.96H24.5875V8.1091H25.9472V9.46948C25.9472 9.53032 25.9772 9.5617 26.0384 9.5617C26.0995 9.5617 26.1489 9.5215 26.1897 9.43906C26.7134 8.39938 27.6201 7.87954 28.91 7.87954C29.5646 7.87954 30.1765 8.03746 30.7458 8.3533C31.3151 8.66914 31.7777 9.14584 32.1365 9.78238H32.1355ZM31.3121 12.0824C31.3121 11.1447 31.0629 10.4141 30.5645 9.8893C30.0659 9.3655 29.4084 9.10264 28.5918 9.10264C27.7753 9.10264 27.1178 9.3655 26.6193 9.8893C26.1208 10.415 25.9375 11.1458 25.9375 12.0824C25.9375 13.0191 26.1208 13.7508 26.6193 14.2756C27.1178 14.8013 27.7743 15.0622 28.5918 15.0622C29.4094 15.0622 30.0659 14.7993 30.5645 14.2756C31.0629 13.7518 31.3121 13.0191 31.3121 12.0824ZM40.021 13.5213H41.4563C41.2652 14.2658 40.8744 14.9102 40.2857 15.4545C39.6961 15.9999 38.8524 16.2716 37.7536 16.2716C36.9273 16.2716 36.2 16.1009 35.5706 15.7596C34.9412 15.4182 34.4553 14.9327 34.1119 14.3001C33.7687 13.6685 33.598 12.9249 33.598 12.0687C33.598 11.2124 33.7648 10.469 34.0964 9.83728C34.4281 9.20566 34.8946 8.71912 35.4939 8.37784C36.0933 8.0365 36.7954 7.8658 37.6013 7.8658C38.4072 7.8658 39.0754 8.03452 39.634 8.36998C40.1936 8.7064 40.6106 9.15268 40.888 9.70684C41.1653 10.263 41.303 10.8711 41.303 11.5332V12.4502H35.0323C35.0817 13.2447 35.3475 13.8774 35.8256 14.3452C36.3037 14.814 36.9467 15.0485 37.7526 15.0485C38.4072 15.0485 38.9096 14.9141 39.2568 14.6434C39.6039 14.3727 39.8581 13.999 40.02 13.5194L40.021 13.5213ZM35.0042 11.3056H39.7494C39.7494 10.6131 39.5729 10.0698 39.2199 9.67744C38.8669 9.28606 38.3132 9.0889 37.5577 9.0889C36.8526 9.0889 36.2756 9.28018 35.8276 9.66274C35.3795 10.0443 35.1051 10.5926 35.0042 11.3056ZM56.6676 16.044H58.0283V5.04004H56.6676V16.045V16.044ZM75.79 7.22926H77.3789V5.50888H75.79V7.22926ZM81.6563 14.8602C81.4093 14.8857 81.2597 14.8984 81.2106 14.8984C81.1407 14.8984 81.0832 14.8778 81.0437 14.8366C81.0037 14.7964 80.9827 14.7405 80.9827 14.6679C80.9827 14.6179 80.9959 14.4668 81.0216 14.2167C81.0455 13.9676 81.0593 13.5821 81.0593 13.0632V9.26056H82.9988L82.6165 8.09632H81.0599V5.95612H79.7007V8.09536H78.2213V9.2596H79.7007V13.4438C79.7007 14.3207 79.9131 14.9729 80.3354 15.4006C80.7584 15.8282 81.4033 16.043 82.2707 16.043H83.3284V14.8209H82.799C82.2851 14.8209 81.9046 14.8337 81.6575 14.8592L81.6563 14.8602ZM89.8755 8.09632L87.6237 14.765C87.5938 14.8474 87.546 14.9543 87.3922 14.9543C87.2379 14.9543 87.1894 14.8474 87.1589 14.765L84.9072 8.09632H83.5204L86.1282 16.044H87.0506C87.1105 16.044 87.1565 16.0499 87.1876 16.0597C87.2175 16.0695 87.2427 16.095 87.263 16.1362C87.3025 16.197 87.2977 16.2892 87.2475 16.4109L86.8245 17.5722C86.7635 17.7252 86.648 17.8017 86.4775 17.8017C86.4165 17.8017 86.2759 17.7889 86.0546 17.7634C85.8326 17.7379 85.5467 17.7252 85.1937 17.7252H84.09V18.9473H85.5407C86.3872 18.9473 86.8963 18.8021 87.3348 18.5118C87.7733 18.2215 88.1125 17.7095 88.3548 16.9758L91.1713 8.40136V8.09632H89.8755ZM71.1878 11.0614L69.0569 8.09632H67.5607V8.40136L70.114 11.8401L67.0007 15.738V16.043H68.5274L71.0059 12.8484L73.3181 16.043H74.7844V15.738L72.0786 12.0697L75.0117 8.41708V8.09632H73.485L71.1884 11.0614H71.1878ZM75.9348 16.044H77.2952V8.09728H75.9348V16.045V16.044ZM66.9822 13.5213C66.7901 14.2658 66.4007 14.9102 65.812 15.4545C65.2222 15.9999 64.3787 16.2716 63.2797 16.2716C62.4535 16.2716 61.7261 16.1009 61.0967 15.7596C60.4662 15.4182 59.9816 14.9327 59.6382 14.3001C59.2958 13.6685 59.1251 12.9249 59.1251 12.0687C59.1251 11.2124 59.2919 10.469 59.6236 9.83728C59.9565 9.20566 60.4219 8.71912 61.0214 8.37784C61.6202 8.0365 62.3225 7.8658 63.1295 7.8658C63.9366 7.8658 64.6036 8.03452 65.1629 8.36998C65.7217 8.7064 66.1399 9.15268 66.4168 9.70684C66.6944 10.263 66.832 10.8711 66.832 11.5332V12.4502H60.5607C60.611 13.2447 60.8754 13.8774 61.354 14.3452C61.832 14.814 62.4751 15.0485 63.2809 15.0485C63.9354 15.0485 64.4379 14.9141 64.7849 14.6434C65.1318 14.3727 65.3861 13.999 65.547 13.5194H66.9834L66.9822 13.5213ZM60.5643 11.3056H65.3095C65.3095 10.6131 65.133 10.0698 64.7813 9.67744C64.4277 9.28606 63.8743 9.0889 63.1188 9.0889C62.4134 9.0889 61.8368 9.28018 61.3887 9.66274C60.9406 10.0443 60.6654 10.5926 60.5655 11.3056H60.5643Z"
          fill="currentColor"
        />
      </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="M12 2.25V21.75M6.86501 8.2865V3.2915L12 8.2865M12 8.2865L6.86501 13.505V20.7085L12 15.5365M12 8.2865L17.135 3.2915V8.2865"
          stroke="#20808d"
          strokeLinecap="round"
          strokeLinejoin="round"
        />
        <path
          d="M6.865 15.698H4.72V8.2865H19.28V15.698H17.135"
          stroke="#20808d"
          strokeLinecap="round"
          strokeLinejoin="round"
        />
        <path
          d="M12 8.2865L17.135 13.505V20.7085L12 15.5365"
          stroke="#20808d"
          strokeLinecap="round"
          strokeLinejoin="round"
        />
      </svg>
    );
  }

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

PerplexityAI.displayName = "PerplexityAI";

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

export default PerplexityAI;
