import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { CircleX, CircleCheck, AlertTriangle, Info } from 'lucide-react';
export function MessageBox({ icon, status, title, children, className }) {
    let defaultIcon, titleColor, textColor, bgColor;
    switch (status) {
        case 'error': {
            defaultIcon = _jsx(CircleX, { className: "size-5 text-destructive", "aria-hidden": "true" });
            titleColor = "";
            textColor = "text-foreground";
            bgColor = "bg-destructive border border-destructive";
            break;
        }
        case 'warning': {
            defaultIcon = _jsx(AlertTriangle, { className: "size-5 text-attention", "aria-hidden": "true" });
            titleColor = "";
            textColor = "text-foreground";
            bgColor = "bg-attention border border-attention";
            break;
        }
        case 'success': {
            defaultIcon = _jsx(CircleCheck, { className: "size-5 text-success", "aria-hidden": "true" });
            titleColor = "";
            textColor = "text-foreground";
            bgColor = "bg-success border border-success";
            break;
        }
        case 'info': {
            defaultIcon = _jsx(Info, { className: "size-5 text-info", "aria-hidden": "true" });
            titleColor = "";
            textColor = "text-foreground";
            bgColor = "bg-info border border-info";
            break;
        }
        case 'default': {
            defaultIcon = _jsx(Info, { className: "size-5 text-muted", "aria-hidden": "true" });
            titleColor = "";
            textColor = "text-foreground";
            bgColor = "bg-muted border border-muted";
            break;
        }
        case 'done': {
            defaultIcon = _jsx(Info, { className: "size-5 text-done", "aria-hidden": "true" });
            titleColor = "";
            textColor = "text-foreground";
            bgColor = "bg-done border border-done";
            break;
        }
    }
    return (_jsx("div", { className: `rounded-md p-4 ${bgColor} ${className}`, children: _jsxs("div", { className: "flex", children: [_jsx("div", { className: "shrink-0", children: icon ?? defaultIcon }), _jsxs("div", { className: "w-full ml-2 px-1", children: [title && _jsx("h3", { className: `text-sm font-medium mb-2 ${titleColor}`, children: title }), _jsx("div", { className: `text-sm ${textColor} break-words`, children: children })] })] }) }));
}
export function ErrorBox({ title, className, children }) {
    return _jsx(MessageBox, { status: "error", title: title, className: className, children: _jsx("pre", { children: children }) });
}
export function InfoBox({ title, className, children }) {
    return _jsx(MessageBox, { status: "info", title: title, className: className, children: children });
}
export function WarningBox({ title, className, children }) {
    return _jsx(MessageBox, { status: "warning", title: title, className: className, children: children });
}
export function SuccessBox({ title, className, children }) {
    return _jsx(MessageBox, { status: "success", title: title, className: className, children: children });
}
export function DefaultBox({ title, className, children }) {
    return _jsx(MessageBox, { status: "default", title: title, className: className, children: children });
}
//# sourceMappingURL=MessageBox.js.map