import { flow } from "fp-ts-esm/function";
import { Node_Type } from "./../../ricos-schema/legacy/wix/rich_content/v1/index.js";
import { getExtractor } from "../extractor-infra.js";
const nodesAccessor = (node) => Array.isArray(node.nodes) ? node.nodes : [];
const getRootNode = (nodes) => Array.isArray(nodes) ? {
  id: "root",
  type: Node_Type.UNRECOGNIZED,
  nodes
} : nodes;
const extract = flow(
  getRootNode,
  getExtractor(nodesAccessor)
);
export {
  extract
};
//# sourceMappingURL=extract.js.map
