import { jsxs as l, Fragment as d, jsx as e } from "react/jsx-runtime";
import { useState as c } from "react";
import { H as f, C as o, a as r, bw as n, x as m, P as u, A as h, c as b } from "../index-sdOMz8GW.js";
import { Bell as g, Info as p, CheckCircle as w, AlertTriangle as v, WifiOff as N } from "lucide-react";
import "react-router-dom";
import "react-dom";
function x(i) {
  const [a, t] = c(!0);
  return a ? /* @__PURE__ */ e("div", { className: "w-full max-w-xl mx-auto", children: /* @__PURE__ */ e(
    n,
    {
      title: i.title || "Notification",
      variant: i.variant,
      message: i.message,
      dismissible: i.dismissible,
      onDismiss: i.dismissible !== !1 ? () => t(!1) : void 0,
      actions: [{ label: "Action", onClick: () => {
      } }]
    }
  ) }) : /* @__PURE__ */ l("div", { className: "flex flex-col items-center gap-2", children: [
    /* @__PURE__ */ e("p", { className: "text-sm text-gray-500", children: "Banner dismissed" }),
    /* @__PURE__ */ e(m, { size: "mini", onClick: () => t(!0), children: "Restore" })
  ] });
}
const S = () => {
  const [i, a] = c({
    info: !0,
    success: !0,
    warning: !0,
    error: !0
  }), t = () => a({ info: !0, success: !0, warning: !0, error: !0 });
  return /* @__PURE__ */ l(d, { children: [
    /* @__PURE__ */ e(
      f,
      {
        title: "NotificationBanner",
        description: "macOS-style notification banners with four variants (info, success, warning, error), optional dismiss button, action buttons, custom icons, and smooth enter/exit animations.",
        icon: /* @__PURE__ */ e("div", { className: "w-20 h-20 sm:w-24 sm:h-24 md:w-32 md:h-32 bg-linear-to-br from-amber-500 via-orange-500 to-red-500 rounded-full flex items-center justify-center shadow-lg border border-amber-500/50", children: /* @__PURE__ */ e(g, { className: "w-10 h-10 sm:w-12 sm:h-12 md:w-16 md:h-16 text-white filter drop-shadow-lg" }) })
      }
    ),
    /* @__PURE__ */ e(o, { className: "overflow-hidden", children: /* @__PURE__ */ e(r, { title: "All Variants", className: "mt-2 mb-2", children: /* @__PURE__ */ l("div", { className: "w-full p-4 sm:p-6 space-y-3", children: [
      i.info && /* @__PURE__ */ e(
        n,
        {
          variant: "info",
          title: "Update available",
          message: "macOS 14.5 is now available. Restart to install.",
          icon: /* @__PURE__ */ e(p, { className: "w-5 h-5" }),
          actions: [{ label: "Update Now", onClick: () => {
          } }],
          onDismiss: () => a((s) => ({ ...s, info: !1 }))
        }
      ),
      i.success && /* @__PURE__ */ e(
        n,
        {
          variant: "success",
          title: "Backup complete",
          message: "Time Machine backup finished successfully.",
          icon: /* @__PURE__ */ e(w, { className: "w-5 h-5" }),
          onDismiss: () => a((s) => ({ ...s, success: !1 }))
        }
      ),
      i.warning && /* @__PURE__ */ e(
        n,
        {
          variant: "warning",
          title: "Low storage",
          message: "Only 5 GB remaining. Free up space to avoid performance issues.",
          icon: /* @__PURE__ */ e(v, { className: "w-5 h-5" }),
          actions: [{ label: "Manage", onClick: () => {
          } }],
          onDismiss: () => a((s) => ({ ...s, warning: !1 }))
        }
      ),
      i.error && /* @__PURE__ */ e(
        n,
        {
          variant: "error",
          title: "Network error",
          message: "Unable to connect. Check your internet connection.",
          icon: /* @__PURE__ */ e(N, { className: "w-5 h-5" }),
          actions: [{ label: "Try Again", onClick: () => {
          } }],
          onDismiss: () => a((s) => ({ ...s, error: !1 }))
        }
      ),
      !Object.values(i).some(Boolean) && /* @__PURE__ */ e("p", { className: "text-center text-sm text-gray-400 py-4", children: "All banners dismissed." }),
      /* @__PURE__ */ e("div", { className: "flex justify-center pt-2", children: /* @__PURE__ */ e(m, { size: "mini", shape: "rounded", onClick: t, children: "Restore All" }) })
    ] }) }) }),
    /* @__PURE__ */ e(o, { className: "overflow-hidden", children: /* @__PURE__ */ e(r, { title: "Non-dismissible", className: "mt-2 mb-2", children: /* @__PURE__ */ e("div", { className: "w-full p-4 sm:p-6", children: /* @__PURE__ */ e(
      n,
      {
        variant: "warning",
        title: "Attention required",
        message: "This notification cannot be dismissed and requires action.",
        dismissible: !1,
        actions: [{ label: "Take Action", onClick: () => {
        } }]
      }
    ) }) }) }),
    /* @__PURE__ */ e(
      u,
      {
        componentName: "MacOSNotificationBanner",
        defaultValues: {
          variant: "info",
          title: "Notification Title",
          message: "This is a notification message with details.",
          dismissible: !0
        },
        controlOverrides: [
          {
            name: "variant",
            type: "select",
            options: ["info", "success", "warning", "error"],
            description: "Banner severity variant"
          },
          { name: "title", type: "text", description: "Banner heading" },
          { name: "message", type: "text", description: "Banner body message" },
          {
            name: "dismissible",
            type: "boolean",
            description: "Show dismiss (×) button"
          }
        ],
        includeProps: ["variant", "title", "message", "dismissible"],
        excludeProps: ["className", "icon", "actions", "onDismiss"],
        children: (s) => /* @__PURE__ */ e(x, { ...s })
      }
    ),
    /* @__PURE__ */ e(h, { componentName: "MacOSNotificationBanner" }),
    /* @__PURE__ */ e(o, { className: "overflow-hidden", children: /* @__PURE__ */ e(r, { title: "Code Example", className: "mt-2 mb-2", children: /* @__PURE__ */ e("div", { className: "w-full p-4 sm:p-6", children: /* @__PURE__ */ e(
      b,
      {
        language: "tsx",
        code: `import { MacOSNotificationBanner } from '@e-burgos/tucu-ui';

// Info banner with action buttons
<MacOSNotificationBanner
  variant="info"
  title="Update available"
  message="macOS 14.5 is ready to install."
  icon={<InfoIcon />}
  actions={[
    { label: 'Update Now', onClick: handleUpdate },
    { label: 'Later', onClick: handleDismiss },
  ]}
  onDismiss={handleDismiss}
/>

// Non-dismissible warning
<MacOSNotificationBanner
  variant="warning"
  title="Attention"
  message="Action required."
  dismissible={false}
  actions={[{ label: 'Take Action', onClick: handle }]}
/>

// Variants: 'info' | 'success' | 'warning' | 'error'`
      }
    ) }) }) })
  ] });
};
export {
  S as MacOSNotificationBannerSection,
  S as default
};
