"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const jsxRuntime = require("react/jsx-runtime");
const config_context = require("../config/config.context.cjs");
const status_component = require("../status/status.component.cjs");
const StatusWrapper = ({ statusPosition, error, pending, errorIcon, validationMode, children, className }) => {
  const globals = config_context.useArmstrongConfig({
    validationErrorIcon: errorIcon,
    validationMode,
    inputStatusPosition: statusPosition
  });
  const shouldShowErrorIcon = (globals.validationMode === "both" || globals.validationMode === "icon") && !!error;
  return jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [globals.inputStatusPosition === "left" && jsxRuntime.jsx(status_component.Status, { className, error: shouldShowErrorIcon, pending, errorIcon: globals.validationErrorIcon, "data-position": "left" }), children, globals.inputStatusPosition === "right" && jsxRuntime.jsx(status_component.Status, { className, error: shouldShowErrorIcon, pending, errorIcon: globals.validationErrorIcon, "data-position": "right" })] });
};
exports.StatusWrapper = StatusWrapper;
//# sourceMappingURL=statusWrapper.component.cjs.map
