import { useMemo } from "react"; import { AI_HELP } from "../../telemetry/constants"; import { Icon } from "../../ui/atoms/icon"; import { SignUpLink } from "../../ui/atoms/signup-link"; import { useUserData } from "../../user-context"; import { PlusLoginBanner } from "../common/login-banner"; import { isPlusSubscriber } from "../../utils"; export function AiHelpBanner({ isDisabled = false, }: { isDisabled?: boolean } = {}) { const user = useUserData(); const isSubscriber = useMemo(() => isPlusSubscriber(user), [user]); return (

{isSubscriber ? "GPT-4o-powered AI Help." : "Supercharge your AI Help experience with our paid subscriptions."}

{isSubscriber ? "Now with chat history, enhanced context, and optimized prompts." : "Upgrade to MDN Plus 5 or Supporter 10 to unlock the full potential of GPT-4o-powered AI Help."}

{!isSubscriber && ( )}
); } export function AiLoginBanner() { return ( Want to use AI Help? ); } export function AiUpsellBanner({ limit }: { limit: number }) { return (
You have reached the limit of {limit} questions per day.
Want to ask more? Upgrade to MDN Plus 5 or MDN Supporter 10.
); }