"use client";
'use strict';

var jsxRuntime = require('react/jsx-runtime');
var reactIcons_esm = require('../../node_modules/.pnpm/@radix-ui_react-icons@1.3.2_react@19.1.1/node_modules/@radix-ui/react-icons/dist/react-icons.esm.cjs');
var index = require('../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.cjs');
var React = require('react');
var callout_module = require('./callout.module.css.cjs');

const callout = index.cva(callout_module.default.callout, {
    variants: {
        type: {
            grey: callout_module.default['callout-grey'],
            success: callout_module.default['callout-success'],
            alert: callout_module.default['callout-alert'],
            gradient: callout_module.default['callout-gradient'],
            accent: callout_module.default['callout-accent'],
            attention: callout_module.default['callout-attention'],
            normal: callout_module.default['callout-normal']
        },
        outline: {
            true: callout_module.default['callout-outline']
        },
        highContrast: {
            true: callout_module.default['callout-high-contrast']
        }
    },
    defaultVariants: {
        type: 'grey'
    }
});
const Callout = React.forwardRef(({ className, type = 'grey', outline, highContrast, children, action, dismissible, onDismiss, width, style, icon = jsxRuntime.jsx(reactIcons_esm.InfoCircledIcon, {}), ...props }, ref) => {
    const combinedStyle = {
        ...style,
        ...(width && { width: typeof width === 'number' ? `${width}px` : width })
    };
    const getRole = () => {
        switch (type) {
            case 'alert':
                return 'alert';
            case 'success':
                return 'status';
            default:
                return 'status';
        }
    };
    return (jsxRuntime.jsx("div", { ref: ref, className: `${callout({ type, outline, highContrast })} ${className || ''}`, style: combinedStyle, role: getRole(), "aria-live": type === 'alert' ? 'assertive' : 'polite', ...props, children: jsxRuntime.jsxs("div", { className: callout_module.default.container, children: [jsxRuntime.jsxs("div", { className: callout_module.default.messageContainer, children: [icon && (jsxRuntime.jsx("div", { className: callout_module.default.icon, "aria-hidden": 'true', children: icon })), jsxRuntime.jsx("div", { className: callout_module.default.message, children: children })] }), jsxRuntime.jsxs("div", { className: callout_module.default.actionsContainer, children: [action && jsxRuntime.jsx("div", { className: callout_module.default.action, children: action }), dismissible && (jsxRuntime.jsx("button", { className: callout_module.default.dismiss, onClick: onDismiss, "aria-label": 'Dismiss message', type: 'button', children: jsxRuntime.jsx("svg", { width: '12', height: '12', viewBox: '0 0 12 12', fill: 'none', xmlns: 'http://www.w3.org/2000/svg', "aria-hidden": 'true', role: 'presentation', children: jsxRuntime.jsx("path", { fillRule: 'evenodd', clipRule: 'evenodd', d: 'M9.5066 3.3066C9.73115 3.08205 9.73115 2.71798 9.5066 2.49343C9.28205 2.26887 8.91798 2.26887 8.69343 2.49343L6.00001 5.18684L3.3066 2.49343C3.08205 2.26887 2.71798 2.26887 2.49343 2.49343C2.26887 2.71798 2.26887 3.08205 2.49343 3.3066L5.18684 6.00001L2.49343 8.69343C2.26887 8.91798 2.26887 9.28205 2.49343 9.5066C2.71798 9.73115 3.08205 9.73115 3.3066 9.5066L6.00001 6.81318L8.69343 9.5066C8.91798 9.73115 9.28205 9.73115 9.5066 9.5066C9.73115 9.28205 9.73115 8.91798 9.5066 8.69343L6.81318 6.00001L9.5066 3.3066Z', fill: 'currentColor' }) }) }))] })] }) }));
});
Callout.displayName = 'Callout';

exports.Callout = Callout;
//# sourceMappingURL=callout.cjs.map
