import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import classNames from 'classnames';
import { ExclamationCircleIcon } from '../../../lib/icons/ExclamationCircle.js';
import { TriangleWarningIcon } from '../../../lib/icons/TriangleWarning.js';
export function Alert(props) {
    const { variant, message, className } = props;
    return (_jsxs("div", { className: classNames('seam-alert', `seam-${variant}-alert`, className), children: [_jsxs("div", { className: 'seam-alert-content', children: [_jsx("div", { className: 'seam-alert-icon-wrap', children: _jsx("div", { className: 'seam-alert-icon', children: variant === 'warning' ? (_jsx(TriangleWarningIcon, {})) : (_jsx(ExclamationCircleIcon, {})) }) }), _jsx("div", { className: 'seam-alert-message-wrap', children: _jsx("p", { className: 'seam-alert-message', children: message }) })] }), props.action != null && _jsx(Action, { ...props.action })] }));
}
function Action(props) {
    const handleClick = (event) => {
        props.onClick(event);
    };
    return (_jsx("div", { className: 'seam-alert-action-wrap', children: _jsx("button", { onClick: handleClick, className: 'seam-alert-action', children: props.label }) }));
}
//# sourceMappingURL=Alert.js.map