"use client";
import { toHast as t } from "../../mdast-util-to-hast/lib/index.js";
function f(r, n) {
  return r && "run" in r ? async function(e, u) {
    const c = (
      /** @type {HastRoot} */
      t(e, { file: u, ...n })
    );
    await r.run(c, u);
  } : function(e, u) {
    return (
      /** @type {HastRoot} */
      t(e, { file: u, ...r || n })
    );
  };
}
export {
  f as default
};
