import { j as jsxRuntimeExports } from '../../node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js';
import { cva } from '../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js';
import { Flex } from '../flex/flex.js';
import { Text } from '../text/text.js';
import styles from './announcement-bar.module.css.js';

const announementBar = cva(styles["announcement-bar"], {
    variants: {
        variant: {
            gradient: styles["announcement-bar-gradient"],
            normal: styles["announcement-bar-normal"],
            error: styles["announcement-bar-error"],
        },
    },
    defaultVariants: {
        variant: "normal",
    },
});
const AnnouncementBar = ({ className, variant, text, leadingIcon, actionLabel, actionIcon, onActionClick = () => { }, ...props }) => {
    return (jsxRuntimeExports.jsxs(Flex, { className: announementBar({ className, variant }), justify: "center", align: "center", gap: "small", ...props, children: [leadingIcon && jsxRuntimeExports.jsx("span", { className: styles["icon"], children: leadingIcon }), jsxRuntimeExports.jsx(Text, { className: styles.text, size: 2, weight: 500, children: text }), actionLabel || actionIcon ? (jsxRuntimeExports.jsxs(Text, { className: styles["action-btn"], size: 2, weight: 500, onClick: onActionClick, children: [actionLabel, actionIcon] })) : null] }));
};

export { AnnouncementBar };
//# sourceMappingURL=announcement-bar.js.map
