// src/utils/toReactNodes/nodes.tsx
import { isObject } from "lodash-es";
function isLinkNode(node) {
  return Boolean(node && isObject(node) && "link" in node);
}
function isNextLinkNode(node) {
  return Boolean(node && isObject(node) && "nextLink" in node);
}
function isIconNode(node) {
  return Boolean(node && isObject(node) && "icon" in node);
}
function isCurrencyAmountNode(node) {
  return Boolean(node && isObject(node) && "currencyAmount" in node);
}
function isClipboardTextFieldNode(node) {
  return Boolean(node && isObject(node) && "clipboardTextField" in node);
}
function isTextNode(node) {
  const allowedKeys = ["text", "onClick", "typography"];
  return Boolean(
    /* Exclude other nodes by ensuring only text node properties: */
    node && isObject(node) && /* text is required: */
    "text" in node && /* ensure the rest of the keys are allowed: */
    Object.keys(node).every((key) => allowedKeys.includes(key))
  );
}
var link = (link2) => ({ link: link2 });
var nextLink = (nextLink2) => ({
  nextLink: nextLink2
});
var currencyAmount = (currencyAmount2) => ({ currencyAmount: currencyAmount2 });
var icon = (icon2) => ({ icon: icon2 });
var clipboardTextField = (clipboardTextField2) => ({ clipboardTextField: clipboardTextField2 });

export {
  isLinkNode,
  isNextLinkNode,
  isIconNode,
  isCurrencyAmountNode,
  isClipboardTextFieldNode,
  isTextNode,
  link,
  nextLink,
  currencyAmount,
  icon,
  clipboardTextField
};
