import { Link } from "@/i18n/navigation";

export function BookOfferButton({ offerTitle, soldOut, label }: { offerTitle: string; soldOut: boolean; label: string }) {
  if (soldOut) {
    return (
      <span className="eyebrow mt-6 inline-block cursor-not-allowed rounded-full bg-ivory/10 px-7 py-3 text-ivory-dim">
        {label}
      </span>
    );
  }

  return (
    <Link
      href={{ pathname: "/reserve", query: { offer: offerTitle } }}
      className="eyebrow mt-6 inline-block rounded-full bg-tomato px-7 py-3 text-ivory transition hover:bg-tomato-dark"
    >
      {label}
    </Link>
  );
}
