/// <reference types="../index.d.ts" />
import type { ArcgisArcadeEditor } from "../components/arcgis-arcade-editor/customElement.js";
import type { ArcgisCodeEditor } from "../components/arcgis-code-editor/customElement.js";
import type { CodeEditorShell } from "../components/arcgis-code-editor-shell/customElement.js";
import type { ArcgisCodeViewer } from "../components/arcgis-code-viewer/customElement.js";
import type { ArcgisSqlExpressionEditor } from "../components/arcgis-sql-expression-editor/customElement.js";
import type { HTMLProps } from 'react';
import type { EventHandler } from "@arcgis/lumina"; 

interface ReactArcgisArcadeEditor extends Partial<Pick<ArcgisArcadeEditor, "arcadeAssistant" | "customPanels" | "editorOptions" | "hideDocumentationActions" | "hideSideBar" | "openedSidePanel" | "profile" | "script" | "sideActionBarExpanded" | "snippets" | "suggestions" | "testData">>, HTMLProps<ArcgisArcadeEditor> {
  onarcgisDiagnosticsChange?: EventHandler<ArcgisArcadeEditor["arcgisDiagnosticsChange"]>;
  onarcgisScriptChange?: EventHandler<ArcgisArcadeEditor["arcgisScriptChange"]>;
}

interface ReactArcgisCodeEditor extends Partial<Pick<ArcgisCodeEditor, "editorOptions" | "language" | "modelId" | "value">>, HTMLProps<ArcgisCodeEditor> {
  onarcgisSelectionChange?: EventHandler<ArcgisCodeEditor["arcgisSelectionChange"]>;
  onarcgisValueChange?: EventHandler<ArcgisCodeEditor["arcgisValueChange"]>;
}

interface ReactArcgisCodeEditorShell extends HTMLProps<CodeEditorShell> {
}

interface ReactArcgisCodeViewer extends Partial<Pick<ArcgisCodeViewer, "language" | "round">>, HTMLProps<ArcgisCodeViewer> {
}

interface ReactArcgisSqlExpressionEditor extends Partial<Pick<ArcgisSqlExpressionEditor, "hideSideBar" | "profile" | "script">>, HTMLProps<ArcgisSqlExpressionEditor> {
  onarcgisDiagnosticsChange?: EventHandler<ArcgisSqlExpressionEditor["arcgisDiagnosticsChange"]>;
  onarcgisScriptChange?: EventHandler<ArcgisSqlExpressionEditor["arcgisScriptChange"]>;
}

declare module "react" {
  namespace JSX {
    interface IntrinsicElements {
      "arcgis-arcade-editor": ReactArcgisArcadeEditor;
      "arcgis-code-editor": ReactArcgisCodeEditor;
      "arcgis-code-editor-shell": ReactArcgisCodeEditorShell;
      "arcgis-code-viewer": ReactArcgisCodeViewer;
      "arcgis-sql-expression-editor": ReactArcgisSqlExpressionEditor;
    }
  }
}
declare module "react/jsx-runtime" {
  namespace JSX {
    interface IntrinsicElements {
      "arcgis-arcade-editor": ReactArcgisArcadeEditor;
      "arcgis-code-editor": ReactArcgisCodeEditor;
      "arcgis-code-editor-shell": ReactArcgisCodeEditorShell;
      "arcgis-code-viewer": ReactArcgisCodeViewer;
      "arcgis-sql-expression-editor": ReactArcgisSqlExpressionEditor;
    }
  }
}
declare module "react/jsx-dev-runtime" {
  namespace JSX {
    interface IntrinsicElements {
      "arcgis-arcade-editor": ReactArcgisArcadeEditor;
      "arcgis-code-editor": ReactArcgisCodeEditor;
      "arcgis-code-editor-shell": ReactArcgisCodeEditorShell;
      "arcgis-code-viewer": ReactArcgisCodeViewer;
      "arcgis-sql-expression-editor": ReactArcgisSqlExpressionEditor;
    }
  }
}