import { isRecord as n } from "../../../isRecord.js";
import { resolveFieldTypeComponentProps as l } from "../../../resolveFieldContractAliases.js";
import { resolveFieldInputLabel as m } from "../../../resolveFieldInputLabel/resolveFieldInputLabel.js";
function d(t, o) {
  const i = m(t, o), e = l(t.fieldType);
  if (!n(e))
    return { resolvedLabel: i };
  const r = {};
  return typeof e.id == "string" && e.id.trim() !== "" && (r.id = e.id.trim()), typeof e.htmlFor == "string" && e.htmlFor.trim() !== "" && (r.htmlFor = e.htmlFor.trim()), typeof e.inlineText == "string" && e.inlineText.trim() !== "" && (r.inlineText = e.inlineText.trim()), typeof e.helperText == "string" && e.helperText.trim() !== "" && (r.helperText = e.helperText.trim()), typeof e.error == "boolean" && (r.error = e.error), {
    ...r,
    resolvedLabel: i
  };
}
export {
  d as normalizeCheckboxPropsFromBackend
};
