import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Close as CloseIcon } from "./close";
import { Error as ErrorIcon } from "./error";
import { Action, ActionWrapper, Close, Content, Description, Title, TypeIcon, Wrapper, } from "./notification.styled";
import { Ok as OkIcon } from "./ok";
import { InProgress as InProgressIcon } from "./in-progress";
import { NotificationType, } from "../../../types/notification";
export const Notification = ({ type, hideIcon, title, desc, actions, onClose, }) => {
    return (_jsxs(Wrapper, { className: type, children: [!hideIcon && (_jsxs(TypeIcon, { children: [type === NotificationType.info && _jsx(OkIcon, {}), type === NotificationType.error && _jsx(ErrorIcon, {}), type === NotificationType.inProgress && _jsx(InProgressIcon, {})] })), _jsxs(Content, { children: [_jsx(Title, { children: title }), _jsx(Description, { children: desc }), _jsx(ActionWrapper, { children: actions?.map((action, i) => (_jsx(Action, { onClick: action.onClick, className: type, children: action.label }, i))) })] }), onClose && (_jsx(Close, { onClick: onClose, children: _jsx(CloseIcon, {}) }))] }));
};
//# sourceMappingURL=notification.js.map