import Link from "next/link";
import { cn } from "cn";
import type { Locale } from "@/i18n/config";
import { ArrowUpRightIcon } from "@/components/icons";
import { buttonVariants } from "@/components/ui/button";
import { LanguageSwitcher } from "./language-switcher";

type HeaderActionsProps = {
  locale: Locale;
  switchLanguageLabel: string;
  getStartedLabel: string;
  getStartedHref: string;
  className?: string;
};

/** Language switcher + "Get Started" button (desktop header). */
export function HeaderActions({
  locale,
  switchLanguageLabel,
  getStartedLabel,
  getStartedHref,
  className,
}: HeaderActionsProps) {
  return (
    <div className={cn("items-center gap-6", className)}>
      <LanguageSwitcher locale={locale} label={switchLanguageLabel} />
      <Link
        href={getStartedHref}
        className={buttonVariants({ variant: "brand", size: "pill" })}
      >
        {getStartedLabel}
        <ArrowUpRightIcon data-icon="inline-end" className="rtl:-scale-x-100" />
      </Link>
    </div>
  );
}
