import React from "react";
import {map} from "lodash";
import {SelectOption} from "../fields/MultiSelectSearch";
import {fieldMeta} from "../cards";
export const Wrapped = (fieldToRender) =>
{fieldToRender}
export const convertDictToArrayOfOptions = (dict: Record, flipped: boolean) => {
if (Array.isArray(dict)) {
return dict
}
return map(dict, (value, label) => ({
id: flipped ? label : value,
name: flipped ? value : label,
label,
}))
}
/**
* For use in the MultiSelectSearch component with the .meta of a component
*/
export const mapLocalMetaFieldOptions =