import classNames from "classnames";
import { jsx, jsxs } from "react/jsx-runtime";
import styles from "./components/ErrorWrapper/styles.module.scss";
const ErrorWrapper = (props) => {
	const { renderError = true } = props;
	return /* @__PURE__ */ jsxs("div", {
		className: classNames(props.errorText && renderError && styles[`error-wrapper--with-error`], props.className),
		"data-testid": props.testId,
		children: [/* @__PURE__ */ jsx("span", {
			ref: props.errorMessageRef,
			tabIndex: -1,
			children: props.errorText && /* @__PURE__ */ jsx("p", {
				className: styles["error-wrapper__errors"],
				id: props.errorTextId,
				children: props.errorText
			})
		}), props.children]
	});
};
var ErrorWrapper_default$1 = ErrorWrapper;
export { ErrorWrapper as n, ErrorWrapper_default$1 as t };

//# sourceMappingURL=ErrorWrapper.js.map