"use client";
'use strict';

var jsxRuntime = require('react/jsx-runtime');

// src/platform/billing/upgrade-prompt.tsx
var TIER_DISPLAY_NAMES = {
  free_trial: "Free Trial",
  starter: "Starter",
  professional: "Professional",
  enterprise: "Enterprise"
};
function UpgradePrompt({
  currentTier,
  requiredTier,
  feature,
  onUpgrade,
  onDismiss,
  children
}) {
  const currentTierName = TIER_DISPLAY_NAMES[currentTier] ?? currentTier;
  const requiredTierName = requiredTier ? TIER_DISPLAY_NAMES[requiredTier] ?? requiredTier : null;
  const heading = feature ? `Upgrade to unlock ${feature}` : requiredTierName ? `Upgrade to ${requiredTierName}` : "Upgrade your plan";
  return /* @__PURE__ */ jsxRuntime.jsxs(
    "div",
    {
      className: [
        "relative overflow-hidden rounded-2xl border border-white/20",
        "bg-white/10 p-6 backdrop-blur-xl",
        "shadow-lg shadow-black/5",
        "dark:border-white/10 dark:bg-white/5 dark:shadow-black/20"
      ].join(" "),
      role: "alert",
      "aria-label": "Subscription upgrade prompt",
      children: [
        /* @__PURE__ */ jsxRuntime.jsx(
          "div",
          {
            className: "pointer-events-none absolute -right-8 -top-8 h-32 w-32 rounded-full bg-gradient-to-br from-violet-500/20 to-blue-500/20 blur-2xl",
            "aria-hidden": "true"
          }
        ),
        /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex flex-col gap-4", children: [
          /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-10 w-10 items-center justify-center rounded-xl bg-gradient-to-br from-violet-500 to-blue-500 text-white", children: /* @__PURE__ */ jsxRuntime.jsx(
            "svg",
            {
              xmlns: "http://www.w3.org/2000/svg",
              viewBox: "0 0 24 24",
              fill: "currentColor",
              className: "h-5 w-5",
              "aria-hidden": "true",
              children: /* @__PURE__ */ jsxRuntime.jsx(
                "path",
                {
                  fillRule: "evenodd",
                  d: "M9 4.5a.75.75 0 0 1 .721.544l.813 2.846a3.75 3.75 0 0 0 2.576 2.576l2.846.813a.75.75 0 0 1 0 1.442l-2.846.813a3.75 3.75 0 0 0-2.576 2.576l-.813 2.846a.75.75 0 0 1-1.442 0l-.813-2.846a3.75 3.75 0 0 0-2.576-2.576l-2.846-.813a.75.75 0 0 1 0-1.442l2.846-.813A3.75 3.75 0 0 0 7.466 7.89l.813-2.846A.75.75 0 0 1 9 4.5ZM18 1.5a.75.75 0 0 1 .728.568l.258 1.036c.236.94.97 1.674 1.91 1.91l1.036.258a.75.75 0 0 1 0 1.456l-1.036.258c-.94.236-1.674.97-1.91 1.91l-.258 1.036a.75.75 0 0 1-1.456 0l-.258-1.036a2.625 2.625 0 0 0-1.91-1.91l-1.036-.258a.75.75 0 0 1 0-1.456l1.036-.258a2.625 2.625 0 0 0 1.91-1.91l.258-1.036A.75.75 0 0 1 18 1.5Z",
                  clipRule: "evenodd"
                }
              )
            }
          ) }),
          /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-lg font-semibold text-gray-900 dark:text-white", children: heading }),
          /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 text-sm text-gray-600 dark:text-gray-300", children: [
            /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rounded-md bg-gray-200/60 px-2 py-0.5 font-medium dark:bg-white/10", children: currentTierName }),
            requiredTierName && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
              /* @__PURE__ */ jsxRuntime.jsx(
                "svg",
                {
                  xmlns: "http://www.w3.org/2000/svg",
                  viewBox: "0 0 20 20",
                  fill: "currentColor",
                  className: "h-4 w-4 text-gray-400 dark:text-gray-500",
                  "aria-hidden": "true",
                  children: /* @__PURE__ */ jsxRuntime.jsx(
                    "path",
                    {
                      fillRule: "evenodd",
                      d: "M3 10a.75.75 0 0 1 .75-.75h10.638L10.23 5.29a.75.75 0 1 1 1.04-1.08l5.5 5.25a.75.75 0 0 1 0 1.08l-5.5 5.25a.75.75 0 1 1-1.04-1.08l4.158-3.96H3.75A.75.75 0 0 1 3 10Z",
                      clipRule: "evenodd"
                    }
                  )
                }
              ),
              /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rounded-md bg-gradient-to-r from-violet-500/10 to-blue-500/10 px-2 py-0.5 font-medium text-violet-700 dark:from-violet-500/20 dark:to-blue-500/20 dark:text-violet-300", children: requiredTierName })
            ] })
          ] }),
          children,
          /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 pt-1", children: [
            onUpgrade && /* @__PURE__ */ jsxRuntime.jsx(
              "button",
              {
                type: "button",
                onClick: onUpgrade,
                className: [
                  "rounded-xl bg-gradient-to-r from-violet-600 to-blue-600 px-5 py-2 text-sm font-semibold text-white",
                  "shadow-md shadow-violet-500/25 transition-all",
                  "hover:from-violet-500 hover:to-blue-500 hover:shadow-lg hover:shadow-violet-500/30",
                  "focus:outline-none focus:ring-2 focus:ring-violet-500 focus:ring-offset-2",
                  "active:scale-[0.98]",
                  "dark:shadow-violet-500/10 dark:hover:shadow-violet-500/20"
                ].join(" "),
                children: "Upgrade Now"
              }
            ),
            onDismiss && /* @__PURE__ */ jsxRuntime.jsx(
              "button",
              {
                type: "button",
                onClick: onDismiss,
                className: [
                  "rounded-xl px-4 py-2 text-sm font-medium",
                  "text-gray-500 transition-colors",
                  "hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200",
                  "focus:outline-none focus:ring-2 focus:ring-gray-300 focus:ring-offset-2"
                ].join(" "),
                children: "Maybe Later"
              }
            )
          ] })
        ] })
      ]
    }
  );
}

exports.UpgradePrompt = UpgradePrompt;
//# sourceMappingURL=chunk-P4RVGMZL.js.map
//# sourceMappingURL=chunk-P4RVGMZL.js.map