export type * from "./utils/types";

/**
 * Get a resolved path from where an asset can be loaded.
 *
 * @param suffix - The relative path for the asset.
 */
export function getAssetPath(suffix: string): string;

/**
 * Used to manually set the base path where package assets (like localization
 * and icons) can be found.
 *
 * By default, the package assets are loaded from
 * `https://js.arcgis.com/<version>/<simplified-package-name>/`. We are hosting
 * our assets on a CDN (Content Delivery Network) to ensure fast and reliable
 * access. It is CORS-enabled, so you can load the assets from any domain. This
 * is the recommended way to load the assets and avoid bundling them with your
 * application.
 *
 * However, if you need to host the assets locally, you can copy them manually
 * as part of your build process and use `setAssetPath` to customize where the
 * browser will load the assets from.
 *
 * @param path - Relative or absolute path to the assets folder.
 */
export function setAssetPath(path: URL | string): void;

import type { ArcgisCkeditor5 } from "./components/arcgis-ckeditor5/customElement.js";
import type { ArcgisCkeditor5Popover } from "./components/arcgis-ckeditor5-popover/customElement.js";
import type { ArcgisColorInput } from "./components/arcgis-color-input/customElement.js";
import type { ArcgisFieldInfo } from "./components/arcgis-field-info/customElement.js";
import type { ArcgisFieldPickList } from "./components/arcgis-field-pick-list/customElement.js";
import type { ArcgisHistogram } from "./components/arcgis-histogram/customElement.js";
import type { ArcgisLabelInput } from "./components/arcgis-label-input/customElement.js";
import type { ArcgisPickerInput } from "./components/arcgis-picker-input/customElement.js";
import type { ArcgisRampColor } from "./components/arcgis-ramp-color/customElement.js";
import type { ArcgisRampColorBreak } from "./components/arcgis-ramp-color-break/customElement.js";
import type { ArcgisRampOpacity } from "./components/arcgis-ramp-opacity/customElement.js";
import type { ArcgisSlider } from "./components/arcgis-slider/customElement.js";
import type { ArcgisSliderInput } from "./components/arcgis-slider-input/customElement.js";
import type { ArcgisSpatialReferencePicker } from "./components/arcgis-spatial-reference-picker/customElement.js";
import type { ArcgisSpatialReferencePickerTree } from "./components/arcgis-spatial-reference-picker-tree/customElement.js";
import type { ArcgisTicks } from "./components/arcgis-ticks/customElement.js";
import type { ArcgisUniqueValuesList } from "./components/arcgis-unique-values-list/customElement.js";

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

export interface ArcgisCkeditor5CustomEvent<T> extends CustomEvent<T> {
  detail: T;
  target: ArcgisCkeditor5;
  currentTarget: ArcgisCkeditor5;
}
export interface ArcgisCkeditor5PopoverCustomEvent<T> extends CustomEvent<T> {
  detail: T;
  target: ArcgisCkeditor5Popover;
  currentTarget: ArcgisCkeditor5Popover;
}
export interface ArcgisColorInputCustomEvent<T> extends CustomEvent<T> {
  detail: T;
  target: ArcgisColorInput;
  currentTarget: ArcgisColorInput;
}
export interface ArcgisFieldInfoCustomEvent<T> extends CustomEvent<T> {
  detail: T;
  target: ArcgisFieldInfo;
  currentTarget: ArcgisFieldInfo;
}
export interface ArcgisFieldPickListCustomEvent<T> extends CustomEvent<T> {
  detail: T;
  target: ArcgisFieldPickList;
  currentTarget: ArcgisFieldPickList;
}
export interface ArcgisLabelInputCustomEvent<T> extends CustomEvent<T> {
  detail: T;
  target: ArcgisLabelInput;
  currentTarget: ArcgisLabelInput;
}
export interface ArcgisPickerInputCustomEvent<T> extends CustomEvent<T> {
  detail: T;
  target: ArcgisPickerInput;
  currentTarget: ArcgisPickerInput;
}
export interface ArcgisSliderCustomEvent<T> extends CustomEvent<T> {
  detail: T;
  target: ArcgisSlider;
  currentTarget: ArcgisSlider;
}
export interface ArcgisSliderInputCustomEvent<T> extends CustomEvent<T> {
  detail: T;
  target: ArcgisSliderInput;
  currentTarget: ArcgisSliderInput;
}
export interface ArcgisSpatialReferencePickerCustomEvent<T> extends CustomEvent<T> {
  detail: T;
  target: ArcgisSpatialReferencePicker;
  currentTarget: ArcgisSpatialReferencePicker;
}
export interface ArcgisSpatialReferencePickerTreeCustomEvent<T> extends CustomEvent<T> {
  detail: T;
  target: ArcgisSpatialReferencePickerTree;
  currentTarget: ArcgisSpatialReferencePickerTree;
}
export interface ArcgisTicksCustomEvent<T> extends CustomEvent<T> {
  detail: T;
  target: ArcgisTicks;
  currentTarget: ArcgisTicks;
}
export interface ArcgisUniqueValuesListCustomEvent<T> extends CustomEvent<T> {
  detail: T;
  target: ArcgisUniqueValuesList;
  currentTarget: ArcgisUniqueValuesList;
}


declare global {
  interface HTMLElementTagNameMap {
    "arcgis-ckeditor5": ArcgisCkeditor5;
    "arcgis-ckeditor5-popover": ArcgisCkeditor5Popover;
    "arcgis-color-input": ArcgisColorInput;
    "arcgis-field-info": ArcgisFieldInfo;
    "arcgis-field-pick-list": ArcgisFieldPickList;
    "arcgis-histogram": ArcgisHistogram;
    "arcgis-label-input": ArcgisLabelInput;
    "arcgis-picker-input": ArcgisPickerInput;
    "arcgis-ramp-color": ArcgisRampColor;
    "arcgis-ramp-color-break": ArcgisRampColorBreak;
    "arcgis-ramp-opacity": ArcgisRampOpacity;
    "arcgis-slider": ArcgisSlider;
    "arcgis-slider-input": ArcgisSliderInput;
    "arcgis-spatial-reference-picker": ArcgisSpatialReferencePicker;
    "arcgis-spatial-reference-picker-tree": ArcgisSpatialReferencePickerTree;
    "arcgis-ticks": ArcgisTicks;
    "arcgis-unique-values-list": ArcgisUniqueValuesList;

  }

  type HTMLArcgisCkeditor5ElementEventMap = ArcgisCkeditor5["@eventTypes"];
  type HTMLArcgisCkeditor5Element = ArcgisCkeditor5;

  type HTMLArcgisCkeditor5PopoverElementEventMap = ArcgisCkeditor5Popover["@eventTypes"];
  type HTMLArcgisCkeditor5PopoverElement = ArcgisCkeditor5Popover;

  type HTMLArcgisColorInputElementEventMap = ArcgisColorInput["@eventTypes"];
  type HTMLArcgisColorInputElement = ArcgisColorInput;

  type HTMLArcgisFieldInfoElementEventMap = ArcgisFieldInfo["@eventTypes"];
  type HTMLArcgisFieldInfoElement = ArcgisFieldInfo;

  type HTMLArcgisFieldPickListElementEventMap = ArcgisFieldPickList["@eventTypes"];
  type HTMLArcgisFieldPickListElement = ArcgisFieldPickList;

  type HTMLArcgisHistogramElement = ArcgisHistogram;

  type HTMLArcgisLabelInputElementEventMap = ArcgisLabelInput["@eventTypes"];
  type HTMLArcgisLabelInputElement = ArcgisLabelInput;

  type HTMLArcgisPickerInputElementEventMap = ArcgisPickerInput["@eventTypes"];
  type HTMLArcgisPickerInputElement = ArcgisPickerInput;

  type HTMLArcgisRampColorElement = ArcgisRampColor;

  type HTMLArcgisRampColorBreakElement = ArcgisRampColorBreak;

  type HTMLArcgisRampOpacityElement = ArcgisRampOpacity;

  type HTMLArcgisSliderElementEventMap = ArcgisSlider["@eventTypes"];
  type HTMLArcgisSliderElement = ArcgisSlider;

  type HTMLArcgisSliderInputElementEventMap = ArcgisSliderInput["@eventTypes"];
  type HTMLArcgisSliderInputElement = ArcgisSliderInput;

  type HTMLArcgisSpatialReferencePickerElementEventMap = ArcgisSpatialReferencePicker["@eventTypes"];
  type HTMLArcgisSpatialReferencePickerElement = ArcgisSpatialReferencePicker;

  type HTMLArcgisSpatialReferencePickerTreeElementEventMap = ArcgisSpatialReferencePickerTree["@eventTypes"];
  type HTMLArcgisSpatialReferencePickerTreeElement = ArcgisSpatialReferencePickerTree;

  type HTMLArcgisTicksElementEventMap = ArcgisTicks["@eventTypes"];
  type HTMLArcgisTicksElement = ArcgisTicks;

  type HTMLArcgisUniqueValuesListElementEventMap = ArcgisUniqueValuesList["@eventTypes"];
  type HTMLArcgisUniqueValuesListElement = ArcgisUniqueValuesList;


}