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";

export { getAssetPath, setAssetPath } from './runtime';
export { arcade } from './utils/arcade-monaco/arcade-defaults';
export { sqlExpression } from './utils/sql-expr-monaco/sql-expr-defaults';
export type { Diagnostic } from '@arcgis/arcade-languageservice';
export type * from './utils/index';
export type * from './utils/profile/types';
/**
 * @deprecated Use `setAssetPath` instead
 */
export declare const setArcgisAssetPath: (path: URL | string) => void;
/**
 * @deprecated Use `getAssetPath` instead
 */
export declare const getArcgisAssetPath: (suffix: string) => string;


export interface ArcgisArcadeEditorCustomEvent<T> extends CustomEvent<T> {
  detail: T;
  target: HTMLArcgisArcadeEditorElement;
  currentTarget: HTMLArcgisArcadeEditorElement;
}
export interface ArcgisCodeEditorCustomEvent<T> extends CustomEvent<T> {
  detail: T;
  target: HTMLArcgisCodeEditorElement;
  currentTarget: HTMLArcgisCodeEditorElement;
}
export interface ArcgisSqlExpressionEditorCustomEvent<T> extends CustomEvent<T> {
  detail: T;
  target: HTMLArcgisSqlExpressionEditorElement;
  currentTarget: HTMLArcgisSqlExpressionEditorElement;
}

export { ToEvents, TargetedEvent } from "@arcgis/lumina";

declare global {
  interface HTMLElementTagNameMap {
    "arcgis-arcade-editor": HTMLArcgisArcadeEditorElement;
    "arcgis-code-editor": HTMLArcgisCodeEditorElement;
    "arcgis-code-viewer": HTMLArcgisCodeViewerElement;
    "arcgis-sql-expression-editor": HTMLArcgisSqlExpressionEditorElement;
  }

  interface HTMLArcgisArcadeEditorElementEventMap {
    "arcgisDiagnosticsChange": ArcgisArcadeEditor["arcgisDiagnosticsChange"]["detail"];
    "arcgisScriptChange": ArcgisArcadeEditor["arcgisScriptChange"]["detail"];
  }

  interface HTMLArcgisArcadeEditorElement extends ArcgisArcadeEditor {
    addEventListener<K extends keyof HTMLArcgisArcadeEditorElementEventMap>(type: K, listener: (this: HTMLArcgisArcadeEditorElement, ev: ArcgisArcadeEditorCustomEvent<HTMLArcgisArcadeEditorElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
    addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
    addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
    removeEventListener<K extends keyof HTMLArcgisArcadeEditorElementEventMap>(type: K, listener: (this: HTMLArcgisArcadeEditorElement, ev: ArcgisArcadeEditorCustomEvent<HTMLArcgisArcadeEditorElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
    removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
    removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
  }
  interface HTMLArcgisCodeEditorElementEventMap {
    "arcgisSelectionChange": ArcgisCodeEditor["arcgisSelectionChange"]["detail"];
    "arcgisValueChange": ArcgisCodeEditor["arcgisValueChange"]["detail"];
  }

  interface HTMLArcgisCodeEditorElement extends ArcgisCodeEditor {
    addEventListener<K extends keyof HTMLArcgisCodeEditorElementEventMap>(type: K, listener: (this: HTMLArcgisCodeEditorElement, ev: ArcgisCodeEditorCustomEvent<HTMLArcgisCodeEditorElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
    addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
    addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
    removeEventListener<K extends keyof HTMLArcgisCodeEditorElementEventMap>(type: K, listener: (this: HTMLArcgisCodeEditorElement, ev: ArcgisCodeEditorCustomEvent<HTMLArcgisCodeEditorElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
    removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
    removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
  }
  interface HTMLArcgisCodeViewerElement extends ArcgisCodeViewer {

  }
  interface HTMLArcgisSqlExpressionEditorElementEventMap {
    "arcgisDiagnosticsChange": ArcgisSqlExpressionEditor["arcgisDiagnosticsChange"]["detail"];
    "arcgisScriptChange": ArcgisSqlExpressionEditor["arcgisScriptChange"]["detail"];
  }

  interface HTMLArcgisSqlExpressionEditorElement extends ArcgisSqlExpressionEditor {
    addEventListener<K extends keyof HTMLArcgisSqlExpressionEditorElementEventMap>(type: K, listener: (this: HTMLArcgisSqlExpressionEditorElement, ev: ArcgisSqlExpressionEditorCustomEvent<HTMLArcgisSqlExpressionEditorElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
    addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
    addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
    removeEventListener<K extends keyof HTMLArcgisSqlExpressionEditorElementEventMap>(type: K, listener: (this: HTMLArcgisSqlExpressionEditorElement, ev: ArcgisSqlExpressionEditorCustomEvent<HTMLArcgisSqlExpressionEditorElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
    removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
    removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
  }
}