import { isRecord as n } from "../../../isRecord.js";
import { resolveFieldTypeComponentProps as m } from "../../../resolveFieldContractAliases.js";
import { normalizeFieldOptionsForSelect as s } from "./normalizeFieldOptionsForSelect.js";
import { resolveFieldInputLabel as d } from "../../../resolveFieldInputLabel/resolveFieldInputLabel.js";
function y(r, l, p) {
  const t = d(r, l), i = s(r.options, p), e = m(r.fieldType);
  if (!n(e))
    return { resolvedLabel: t, resolvedSelectOptions: i };
  const o = {};
  return typeof e.id == "string" && e.id.trim() !== "" && (o.id = e.id.trim()), typeof e.placeholder == "string" && e.placeholder.trim() !== "" && (o.placeholder = e.placeholder.trim()), typeof e.multiple == "boolean" && (o.multiple = e.multiple), {
    ...o,
    resolvedLabel: t,
    resolvedSelectOptions: i
  };
}
export {
  y as normalizeSelectPropsFromBackend
};
