"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("react"),i=require("../index-DEZRGktf.js"),t=require("lucide-react");require("react-router-dom");require("react-dom");function c(s){const[a,o]=r.useState(!0);return a?e.jsx("div",{className:"w-full max-w-xl mx-auto",children:e.jsx(i.MacOSNotificationBanner,{title:s.title||"Notification",variant:s.variant,message:s.message,dismissible:s.dismissible,onDismiss:s.dismissible!==!1?()=>o(!1):void 0,actions:[{label:"Action",onClick:()=>{}}]})}):e.jsxs("div",{className:"flex flex-col items-center gap-2",children:[e.jsx("p",{className:"text-sm text-gray-500",children:"Banner dismissed"}),e.jsx(i.Button,{size:"mini",onClick:()=>o(!0),children:"Restore"})]})}const l=()=>{const[s,a]=r.useState({info:!0,success:!0,warning:!0,error:!0}),o=()=>a({info:!0,success:!0,warning:!0,error:!0});return e.jsxs(e.Fragment,{children:[e.jsx(i.HeroCard,{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:e.jsx("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:e.jsx(t.Bell,{className:"w-10 h-10 sm:w-12 sm:h-12 md:w-16 md:h-16 text-white filter drop-shadow-lg"})})}),e.jsx(i.CardContainer,{className:"overflow-hidden",children:e.jsx(i.CardTitle,{title:"All Variants",className:"mt-2 mb-2",children:e.jsxs("div",{className:"w-full p-4 sm:p-6 space-y-3",children:[s.info&&e.jsx(i.MacOSNotificationBanner,{variant:"info",title:"Update available",message:"macOS 14.5 is now available. Restart to install.",icon:e.jsx(t.Info,{className:"w-5 h-5"}),actions:[{label:"Update Now",onClick:()=>{}}],onDismiss:()=>a(n=>({...n,info:!1}))}),s.success&&e.jsx(i.MacOSNotificationBanner,{variant:"success",title:"Backup complete",message:"Time Machine backup finished successfully.",icon:e.jsx(t.CheckCircle,{className:"w-5 h-5"}),onDismiss:()=>a(n=>({...n,success:!1}))}),s.warning&&e.jsx(i.MacOSNotificationBanner,{variant:"warning",title:"Low storage",message:"Only 5 GB remaining. Free up space to avoid performance issues.",icon:e.jsx(t.AlertTriangle,{className:"w-5 h-5"}),actions:[{label:"Manage",onClick:()=>{}}],onDismiss:()=>a(n=>({...n,warning:!1}))}),s.error&&e.jsx(i.MacOSNotificationBanner,{variant:"error",title:"Network error",message:"Unable to connect. Check your internet connection.",icon:e.jsx(t.WifiOff,{className:"w-5 h-5"}),actions:[{label:"Try Again",onClick:()=>{}}],onDismiss:()=>a(n=>({...n,error:!1}))}),!Object.values(s).some(Boolean)&&e.jsx("p",{className:"text-center text-sm text-gray-400 py-4",children:"All banners dismissed."}),e.jsx("div",{className:"flex justify-center pt-2",children:e.jsx(i.Button,{size:"mini",shape:"rounded",onClick:o,children:"Restore All"})})]})})}),e.jsx(i.CardContainer,{className:"overflow-hidden",children:e.jsx(i.CardTitle,{title:"Non-dismissible",className:"mt-2 mb-2",children:e.jsx("div",{className:"w-full p-4 sm:p-6",children:e.jsx(i.MacOSNotificationBanner,{variant:"warning",title:"Attention required",message:"This notification cannot be dismissed and requires action.",dismissible:!1,actions:[{label:"Take Action",onClick:()=>{}}]})})})}),e.jsx(i.PropPlayground,{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:n=>e.jsx(c,{...n})}),e.jsx(i.AutoPropsTable,{componentName:"MacOSNotificationBanner"}),e.jsx(i.CardContainer,{className:"overflow-hidden",children:e.jsx(i.CardTitle,{title:"Code Example",className:"mt-2 mb-2",children:e.jsx("div",{className:"w-full p-4 sm:p-6",children:e.jsx(i.CodeBlock,{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'`})})})})]})};exports.MacOSNotificationBannerSection=l;exports.default=l;
