import { isRecord as i } from "../../../isRecord.js";
import { resolveFieldTypeComponentProps as t } from "../../../resolveFieldContractAliases.js";
import { resolveFieldInputLabel as p } from "../../../resolveFieldInputLabel/resolveFieldInputLabel.js";
function c(o, r) {
  const n = p(o, r), e = t(o.fieldType);
  if (!i(e))
    return { resolvedLabel: n };
  const a = {};
  return typeof e.name == "string" && e.name.trim() !== "" && (a.name = e.name.trim()), typeof e.calendars == "number" && Number.isInteger(e.calendars) && e.calendars > 0 && (a.calendars = e.calendars), typeof e.compact == "boolean" && (a.compact = e.compact), typeof e.openOnFocus == "boolean" && (a.openOnFocus = e.openOnFocus), typeof e.readOnly == "boolean" && (a.readOnly = e.readOnly), (e.timeDisplayVariant === "ampm" || e.timeDisplayVariant === "auto" || e.timeDisplayVariant === "military") && (a.timeDisplayVariant = e.timeDisplayVariant), {
    ...a,
    resolvedLabel: n
  };
}
export {
  c as normalizeDateRangePickerPropsFromBackend
};
