/// <reference types="../index.d.ts" />
import type { ArcgisArcadeEditor } from "../components/arcgis-arcade-editor/index.js";
import type { ArcgisCodeEditor } from "../components/arcgis-code-editor/index.js";
import type { ArcgisCodeViewer } from "../components/arcgis-code-viewer/index.js";
import type { ArcgisSqlExpressionEditor } from "../components/arcgis-sql-expression-editor/index.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<HTMLArcgisArcadeEditorElement> {
  onarcgisDiagnosticsChange?: EventHandler<HTMLArcgisArcadeEditorElement["arcgisDiagnosticsChange"]>;
  onarcgisScriptChange?: EventHandler<HTMLArcgisArcadeEditorElement["arcgisScriptChange"]>;
}

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

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

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

declare module "react" {
  namespace JSX {
    interface IntrinsicElements {
      "arcgis-arcade-editor": ReactArcgisArcadeEditor;
      "arcgis-code-editor": ReactArcgisCodeEditor;
      "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-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-viewer": ReactArcgisCodeViewer;
      "arcgis-sql-expression-editor": ReactArcgisSqlExpressionEditor;
    }
  }
}