diff --git a/client/hooks/use-aethex-toast.ts b/client/hooks/use-aethex-toast.ts new file mode 100644 index 00000000..d8a38da6 --- /dev/null +++ b/client/hooks/use-aethex-toast.ts @@ -0,0 +1,89 @@ +import { toast as baseToast } from "@/components/ui/use-toast"; +import { Zap, CheckCircle, AlertTriangle, Info, Sparkles } from "lucide-react"; + +interface AethexToastOptions { + title?: string; + description?: string; + duration?: number; +} + +export const useAethexToast = () => { + const success = (options: AethexToastOptions) => { + return baseToast({ + title: ( +
+ + {options.title || "Success"} +
+ ), + description: options.description, + duration: options.duration || 5000, + variant: "success" as any, + }); + }; + + const error = (options: AethexToastOptions) => { + return baseToast({ + title: ( +
+ + {options.title || "Error"} +
+ ), + description: options.description, + duration: options.duration || 5000, + variant: "destructive", + }); + }; + + const warning = (options: AethexToastOptions) => { + return baseToast({ + title: ( +
+ + {options.title || "Warning"} +
+ ), + description: options.description, + duration: options.duration || 5000, + variant: "warning" as any, + }); + }; + + const info = (options: AethexToastOptions) => { + return baseToast({ + title: ( +
+ + {options.title || "Information"} +
+ ), + description: options.description, + duration: options.duration || 5000, + variant: "info" as any, + }); + }; + + const aethex = (options: AethexToastOptions) => { + return baseToast({ + title: ( +
+ + {options.title || "AeThex OS"} +
+ ), + description: options.description, + duration: options.duration || 6000, + variant: "aethex" as any, + }); + }; + + return { + success, + error, + warning, + info, + aethex, + toast: baseToast, // Fallback to original toast + }; +}; \ No newline at end of file