import { jsx, jsxs } from 'react/jsx-runtime';
import { forwardRef } from 'react';
import Typography from '../Typography/Typography.js';
import Icon from '../Icon/Icon.js';

const StatusIndicator = forwardRef(({ label = 'Status', iconName = 'update_icon', onClick, isDisable = false, variant = 'default', backgroundColor = false, border = false, }, ref) => {
    const resolvedIconName = variant === 'danger' ? 'close' : iconName;
    const variantColorMap = {
        default: 'var(--ff-avatar-background-color)',
        success: 'var(--status-success-text-color)',
        danger: 'var(--ff-delete-button-attachment)',
    };
    const iconColor = variantColorMap[variant] || variantColorMap.default;
    return (jsx("button", { disabled: isDisable, onClick: onClick, className: `
         ff-status-indicator
          ff-status-indicator--${variant}
          ${backgroundColor
            ? `ff-status-indicator--with-bg ff-status-indicator--${variant}-bg`
            : ''}
          ${border
            ? `ff-status-indicator--with-border ff-status-indicator--${variant}-border`
            : ''}
        `, ref: ref, children: jsxs("div", { className: "ff-status-indicator__content", children: [jsx(Icon, { name: resolvedIconName, color: iconColor, className: `ff-status-indicator__icon ff-status-indicator__icon--${variant}` }), jsx(Typography, { as: "div", fontSize: 12, className: `ff-status-indicator__label ff-status-indicator__label--${variant}`, fontWeight: "medium", lineHeight: "20px", children: label })] }) }));
});

export { StatusIndicator as default };
//# sourceMappingURL=StatusIndicator.js.map
