import { isRecord as n } from "../../../isRecord.js";
import { normalizeFieldOptionsForSelect as m } from "./normalizeFieldOptionsForSelect.js";
import { resolveFieldInputLabel as s } from "../../../resolveFieldInputLabel/resolveFieldInputLabel.js";
function f(r, l, p) {
  const t = s(r, l), i = m(r.options, p), e = r.fieldType.rhfComponentProps;
  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 {
  f as normalizeSelectPropsFromBackend
};
