/**
 * @license MIT
 * author: Cube Dev Team
 * @cube-dev/ui-kit v0.0.0-canary-2305ece
 * Released under the MIT license.
 */

import { jsx as _jsx } from "react/jsx-runtime";
import { memo } from 'react';
import { DangerIcon, ExclamationIcon } from '../../../../icons/index.js';
import { wrapIcon } from '../../../../icons/wrap-icon.js';
import { tasty } from '../../../../tasty/index.js';
export const SuccessIcon = wrapIcon('SuccessIcon', _jsx("svg", { fill: "currentColor", viewBox: "0 0 16 16", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "m13.67 5.88-5.8 5.8a1.1 1.1 0 0 1-1.55 0l-3-3a1.1 1.1 0 0 1 1.56-1.55l2.21 2.21 5.03-5.02a1.1 1.1 0 0 1 1.55 1.56Z" }) }));
const IconContainer = tasty({
    styles: {
        boxSizing: 'border-box',
        display: 'flex',
        alignSelf: 'start',
        gridArea: 'icon',
        minHeight: '3x',
        placeContent: 'center',
    },
});
const IconPreset = tasty({
    styles: {
        boxSizing: 'border-box',
        display: 'flex',
        fill: {
            '': '#warning-bg',
            attention: '#warning-bg',
            success: '#success-bg',
            danger: '#danger-bg',
        },
        color: {
            '': '#warning-text',
            attention: '#warning-text',
            success: '#success-text',
            danger: '#danger-text',
        },
        radius: '1r',
        width: '3x',
        height: '3x',
        padding: '0.5x',
        alignItems: 'center',
        justifyContent: 'center',
        '& svg': {
            width: '100%',
            height: '100%',
        },
    },
});
/**
 * @internal This component is unstable and must not be used outside of `NotificationView`.
 */
export const NotificationIcon = memo(function NotificationIcon(props) {
    const { icon, type } = props;
    return (_jsx(IconContainer, { children: icon ? (icon) : (_jsx(IconPreset, { mods: {
                attention: type === 'attention',
                success: type === 'success',
                danger: type === 'danger',
            }, children: iconsByType[type] })) }));
});
const iconsByType = {
    attention: _jsx(ExclamationIcon, {}),
    success: _jsx(SuccessIcon, {}),
    danger: _jsx(DangerIcon, {}),
};

        