function normalizeCustomFieldOption(option) {
  if (typeof option === "string") {
    const value = option.trim();
    if (!value) return null;
    return { value, label: value };
  }
  if (!option || typeof option !== "object") return null;
  const rawValue = typeof option.value === "string" ? option.value.trim() : "";
  if (!rawValue) return null;
  const rawLabel = typeof option.label === "string" ? option.label.trim() : "";
  return { value: rawValue, label: rawLabel || rawValue };
}
function normalizeCustomFieldOptions(options) {
  if (!Array.isArray(options)) return [];
  const normalized = [];
  for (const entry of options) {
    const item = normalizeCustomFieldOption(entry);
    if (item) normalized.push(item);
  }
  return normalized;
}
export {
  normalizeCustomFieldOption,
  normalizeCustomFieldOptions
};
//# sourceMappingURL=options.js.map
