import { jsx as _jsx } from "react/jsx-runtime";
import { useStyleConfig, vui } from '../core';
import Icon from '../icon';
import { cs } from '../utils';
import { notificationStatusMapping } from './consts';
import { useNotificationContext } from './context';
/** Displays an icon based on the status within the Notification. */
export const NotificationIcon = vui((props, ref) => {
    const { className, alignSelf, ...rest } = props;
    const mergedProps = { ...useNotificationContext(), ...props };
    const styles = useStyleConfig('Notification', useNotificationContext());
    const { status = '' } = mergedProps;
    const { iconProps } = notificationStatusMapping[status] ?? {};
    const marginTop = alignSelf === 'center' ? '0' : '16px';
    return (_jsx(Icon, { alignSelf: alignSelf, className: cs('vui-notificationIcon', className), ml: "16px", mt: marginTop, ref: ref, size: "md", variant: "loading", ...styles.icon, ...iconProps, ...rest }));
});
NotificationIcon.displayName = 'NotificationIcon';
export default NotificationIcon;
//# sourceMappingURL=notificationIcon.js.map