"use client" import { Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle, } from "@/components/ui/dialog" import { Button } from "@/components/ui/button" type DialogType = "success" | "error" | "warning" export function FeedbackDialog({ open, onOpenChange, type, message, onConfirm, }: { open: boolean onOpenChange: (open: boolean) => void type: DialogType message: string onConfirm?: (result: boolean) => void }) { const getColor = () => { switch (type) { case "success": return "text-green-600" case "error": return "text-red-600" case "warning": return "text-yellow-600" } } return ( {type.toUpperCase()}

{message}

{type == "success" || type == "error" ? ( ) : ( <> {" "} )}
) }