import { FAIdentifier } from "../../types/fa-icons";
import { Icon } from "../../types/icon";

export function resolveIcon(
  icon: Icon | FAIdentifier | false | undefined
): Icon | undefined {
  if (typeof icon === "undefined" || typeof icon === "boolean") {
    return undefined;
  }
  if (typeof icon === "string") {
    return {
        identifier: icon
    }
  }
  return icon;
}