import { a as i } from "./mergeProps-B-cqsBhL.es.js";
import { $ as p } from "./useLabels-BOBP8-HM.es.js";
function $(o) {
  let { id: l, label: t, "aria-labelledby": e, "aria-label": b, labelElementType: d = "label" } = o;
  l = i(l);
  let a = i(), r = {};
  t ? (e = e ? `${a} ${e}` : a, r = {
    id: a,
    htmlFor: d === "label" ? l : void 0
  }) : !e && !b && process.env.NODE_ENV !== "production" && console.warn("If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility");
  let f = p({
    id: l,
    "aria-label": b,
    "aria-labelledby": e
  });
  return {
    labelProps: r,
    fieldProps: f
  };
}
export {
  $
};
//# sourceMappingURL=useLabel-D521nHvC.es.js.map
