import React from 'react';
import classnames from 'classnames';
import { useTranslation } from '../hooks/use-translation';
import { jsx as _jsx } from "react/jsx-runtime";
/** A label that would come in handy in cases when we need a highlighted label */
export function LabelAccent({
  recommended,
  suggested,
  failed,
  info,
  label,
  recommendedText: recommendedTextParams,
  suggestedText: suggestedTextParams,
  failedText: failedTextParams,
  infoText: infoTextParams
}) {
  const {
    t
  } = useTranslation();
  const recommendedText = recommendedTextParams ?? t('recommended');
  const suggestedText = suggestedTextParams ?? t('suggested');
  const failedText = failedTextParams ?? t('failed');
  const infoText = infoTextParams ?? t('info');
  const classNames = classnames('label-accent', {
    recommended,
    success: suggested,
    error: failed,
    info
  });
  const testIds = classnames({
    recommended,
    success: suggested,
    error: failed,
    info
  });
  const getLabel = () => {
    return recommended && recommendedText || suggested && suggestedText || failed && failedText || info && infoText;
  };
  return /*#__PURE__*/_jsx("span", {
    "test-id": `label-accent-${testIds}`,
    className: classNames,
    children: label || getLabel()
  });
}