import { $ as c } from "./useLabel-D521nHvC.es.js";
import { c as l, $ as f } from "./mergeProps-B-cqsBhL.es.js";
function $(e) {
  let { description: a, errorMessage: o, isInvalid: i, validationState: d } = e, { labelProps: n, fieldProps: r } = c(e), s = l([
    !!a,
    !!o,
    i,
    d
  ]), t = l([
    !!a,
    !!o,
    i,
    d
  ]);
  return r = f(r, {
    "aria-describedby": [
      s,
      // Use aria-describedby for error message because aria-errormessage is unsupported using VoiceOver or NVDA. See https://github.com/adobe/react-spectrum/issues/1346#issuecomment-740136268
      t,
      e["aria-describedby"]
    ].filter(Boolean).join(" ") || void 0
  }), {
    labelProps: n,
    fieldProps: r,
    descriptionProps: {
      id: s
    },
    errorMessageProps: {
      id: t
    }
  };
}
export {
  $
};
//# sourceMappingURL=useField-BxLfE_kx.es.js.map
