import { loader } from "@monaco-editor/react"
import { getMonacoLanguage } from "~/shared/i18n"

loader.config({
  paths: {
    vs: "/vendor/vs",
  },
  "vs/nls": {
    availableLanguages: {
      "*": getMonacoLanguage(),
    },
  },
})

const monaco = await loader.init()
export default monaco

export const { editor, languages, MarkerSeverity } = monaco
