import type * as monaco from "monaco-editor"
import type { OutlineModel } from "./outlineModel"

declare namespace Morocco {
  type DocumentSymbolProvider = { __type?: "DocumentSymbolProvider" }
  type CodeActionProvider = unknown
  type CodeLensProvider = unknown
  type DocumentColorProvider = unknown
  type CompletionItemProvider = unknown
  type DeclarationProvider = unknown
  type DefinitionProvider = unknown
  type DocumentFormattingEditProvider = unknown
  type DocumentHighlightProvider = unknown
  type DocumentOnDropEditProvider = unknown
  type DocumentPasteEditProvider = unknown
  type DocumentRangeFormattingEditProvider = unknown
  type DocumentRangeSemanticTokensProvider = unknown
  type DocumentSemanticTokensProvider = unknown
  type EvaluatableExpressionProvider = unknown
  type FoldingRangeProvider = unknown
  type HoverProvider = unknown
  type ImplementationProvider = unknown
  type InlayHintsProvider = unknown
  type InlineCompletionsProvider = unknown
  type InlineValuesProvider = unknown
  type LinkedEditingRangeProvider = unknown
  type LinkProvider = unknown
  type OnTypeFormattingEditProvider = unknown
  type ReferenceProvider = unknown
  type RenameProvider = unknown
  type SelectionRangeProvider = unknown
  type SignatureHelpProvider = unknown
  type TypeDefinitionProvider = unknown

  type ServiceIdentifier<_T> = { readonly __type: unique symbol }

  interface ILanguageFeaturesService {
    codeActionProvider: CodeActionProvider
    codeLensProvider: CodeLensProvider
    colorProvider: DocumentColorProvider
    completionProvider: CompletionItemProvider
    declarationProvider: DeclarationProvider
    definitionProvider: DefinitionProvider
    documentFormattingEditProvider: DocumentFormattingEditProvider
    documentHighlightProvider: DocumentHighlightProvider
    documentOnDropEditProvider: DocumentOnDropEditProvider
    documentPasteEditProvider: DocumentPasteEditProvider
    documentRangeFormattingEditProvider: DocumentRangeFormattingEditProvider
    documentRangeSemanticTokensProvider: DocumentRangeSemanticTokensProvider
    documentSemanticTokensProvider: DocumentSemanticTokensProvider
    documentSymbolProvider: DocumentSymbolProvider
    evaluatableExpressionProvider: EvaluatableExpressionProvider
    foldingRangeProvider: FoldingRangeProvider
    hoverProvider: HoverProvider
    implementationProvider: ImplementationProvider
    inlayHintsProvider: InlayHintsProvider
    inlineCompletionsProvider: InlineCompletionsProvider
    inlineValuesProvider: InlineValuesProvider
    linkedEditingRangeProvider: LinkedEditingRangeProvider
    linkProvider: LinkProvider
    onTypeFormattingEditProvider: OnTypeFormattingEditProvider
    referenceProvider: ReferenceProvider
    renameProvider: RenameProvider
    selectionRangeProvider: SelectionRangeProvider
    signatureHelpProvider: SignatureHelpProvider
    typeDefinitionProvider: TypeDefinitionProvider
  }

  export interface ModuleMap {
    "vs/editor/common/services/languageFeatures": {
      ILanguageFeaturesService: ServiceIdentifier<Readonly<ILanguageFeaturesService>>
    }
    "vs/editor/contrib/documentSymbols/browser/outlineModel": {
      OutlineModel: {
        create(
          documentSymbolProvider: DocumentSymbolProvider,
          model: monaco.editor.ITextModel | null,
        ): Promise<OutlineModel>
      }
    }
    "vs/editor/standalone/browser/standaloneServices": {
      StandaloneServices: {
        get<T>(serviceId: ServiceIdentifier<T>): T
      }
    }
  }
}
