"use client";
import { jsx, jsxs } from "react/jsx-runtime";
import {
  Dialog,
  DialogContent,
  DialogDescription,
  DialogHeader,
  DialogTitle
} from "../ui/dialog";
import { PricingTable } from "./PricingTable";
import { useTranslations } from "next-intl";
function UpgradeModal({ open, onOpenChange, onSelectPlan }) {
  const t = useTranslations("billing");
  const handleSelectPlan = (planSlug) => {
    onSelectPlan == null ? void 0 : onSelectPlan(planSlug);
    onOpenChange(false);
  };
  return /* @__PURE__ */ jsx(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs(DialogContent, { className: "max-w-5xl max-h-[90vh] overflow-y-auto", "data-cy": "upgrade-modal", children: [
    /* @__PURE__ */ jsxs(DialogHeader, { children: [
      /* @__PURE__ */ jsx(DialogTitle, { "data-cy": "upgrade-modal-title", children: t("upgrade") }),
      /* @__PURE__ */ jsx(DialogDescription, { "data-cy": "upgrade-modal-description", children: t("upgradeDescription") || "Choose the plan that best fits your needs" })
    ] }),
    /* @__PURE__ */ jsx("div", { "data-cy": "upgrade-modal-plans", children: /* @__PURE__ */ jsx(PricingTable, { onSelectPlan: handleSelectPlan }) })
  ] }) });
}
export {
  UpgradeModal
};
