import * as n from "monaco-editor";
import { configureYaml as m } from "../configure-language-support.js";
import { getYamlNodeRangeFromPath as l } from "./get-yaml-node-range-from-path.js";
const c = (i) => {
  const e = n.editor.createModel("", "yaml");
  return m(e.uri.toString()), {
    model: e,
    getRangeFromPath: (a) => {
      const t = l(e.getValue(), a);
      if (!t)
        return null;
      const o = e.getPositionAt(t.startOffset), r = e.getPositionAt(t.endOffset);
      return new n.Range(o.lineNumber, o.column, r.lineNumber, r.column);
    }
  };
};
export {
  c as createYamlModel
};
