/// <reference types="../index.d.ts" />
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";
import type { HTMLProps } from 'react';
import type { EventHandler } from "@arcgis/lumina"; 

interface ReactArcgisCkeditor5 extends Partial<Pick<ArcgisCkeditor5, "canResizeVertically" | "currentLanguage" | "customConfig" | "customExpressionCheck" | "editorType" | "groupFieldsAndExpressions" | "intlExpressionsGroupHeading" | "intlFieldsGroupHeading" | "intlTextPlaceHolder" | "mentionFields" | "readOnly" | "textData">>, HTMLProps<ArcgisCkeditor5> {
  onarcgisCkeditor5Created?: EventHandler<ArcgisCkeditor5["arcgisCkeditor5Created"]>;
  onarcgisCkeditor5DataUpdated?: EventHandler<ArcgisCkeditor5["arcgisCkeditor5DataUpdated"]>;
  onarcgisCkeditor5SourceEditingChanged?: EventHandler<ArcgisCkeditor5["arcgisCkeditor5SourceEditingChanged"]>;
  onarcgisCreated?: EventHandler<ArcgisCkeditor5["arcgisCreated"]>;
  onarcgisDataUpdated?: EventHandler<ArcgisCkeditor5["arcgisDataUpdated"]>;
  onarcgisSourceEditingChanged?: EventHandler<ArcgisCkeditor5["arcgisSourceEditingChanged"]>;
}

interface ReactArcgisCkeditor5Popover extends Partial<Pick<ArcgisCkeditor5Popover, "guid" | "intlCancel" | "intlLabel" | "intlOk" | "refElement">>, HTMLProps<ArcgisCkeditor5Popover> {
  onarcgisCkeditor5PopoverClosed?: EventHandler<ArcgisCkeditor5Popover["arcgisCkeditor5PopoverClosed"]>;
  onarcgisPopoverClosed?: EventHandler<ArcgisCkeditor5Popover["arcgisPopoverClosed"]>;
}

interface ReactArcgisColorInput extends Partial<Pick<ArcgisColorInput, "clearable" | "color" | "compact" | "disabled" | "hideRecentColors" | "messageOverrides" | "placement" | "popoverProps" | "showTransparency" | "storageId">>, HTMLProps<ArcgisColorInput> {
  onarcgisChange?: EventHandler<ArcgisColorInput["arcgisChange"]>;
  onarcgisColorInputChange?: EventHandler<ArcgisColorInput["arcgisColorInputChange"]>;
  onarcgisColorInputPopoverClose?: EventHandler<ArcgisColorInput["arcgisColorInputPopoverClose"]>;
  onarcgisColorInputPopoverOpen?: EventHandler<ArcgisColorInput["arcgisColorInputPopoverOpen"]>;
  onarcgisColorInputSwatchUpdate?: EventHandler<ArcgisColorInput["arcgisColorInputSwatchUpdate"]>;
  onarcgisPickerClose?: EventHandler<ArcgisColorInput["arcgisPickerClose"]>;
  onarcgisPickerOpen?: EventHandler<ArcgisColorInput["arcgisPickerOpen"]>;
  onarcgisSwatchUpdate?: EventHandler<ArcgisColorInput["arcgisSwatchUpdate"]>;
}

interface ReactArcgisFieldInfo extends Partial<Pick<ArcgisFieldInfo, "fieldName" | "hideAlias" | "hideNumericFormat" | "hideStatistics" | "layer" | "view">>, HTMLProps<ArcgisFieldInfo> {
  onarcgisComplete?: EventHandler<ArcgisFieldInfo["arcgisComplete"]>;
  onarcgisFieldInfoComplete?: EventHandler<ArcgisFieldInfo["arcgisFieldInfoComplete"]>;
}

interface ReactArcgisFieldPickList extends Partial<Pick<ArcgisFieldPickList, "customExpressionCheck" | "expressionsGroupHeading" | "fields" | "fieldsGroupHeading" | "filterNoResultsText" | "filterPlaceholderText" | "groupFieldsAndExpressions" | "heading" | "hideCancel" | "hideSort" | "layer" | "listOnly" | "mapView" | "multiple" | "okBtnText" | "popoverProps" | "selectedFields" | "showCancel" | "showDescription" | "showFieldInfo" | "showFieldName" | "showFieldTypeIcon" | "showFilterLength" | "showSelectionAll" | "showSort" | "sortBy" | "view">>, HTMLProps<ArcgisFieldPickList> {
  onarcgisChange?: EventHandler<ArcgisFieldPickList["arcgisChange"]>;
  onarcgisClose?: EventHandler<ArcgisFieldPickList["arcgisClose"]>;
  onarcgisDeleteField?: EventHandler<ArcgisFieldPickList["arcgisDeleteField"]>;
  onarcgisEditField?: EventHandler<ArcgisFieldPickList["arcgisEditField"]>;
  onarcgisFieldPickListChange?: EventHandler<ArcgisFieldPickList["arcgisFieldPickListChange"]>;
  onarcgisFieldPickListDismissed?: EventHandler<ArcgisFieldPickList["arcgisFieldPickListDismissed"]>;
  onarcgisFieldPickListSortByChange?: EventHandler<ArcgisFieldPickList["arcgisFieldPickListSortByChange"]>;
  onarcgisSortByChange?: EventHandler<ArcgisFieldPickList["arcgisSortByChange"]>;
}

interface ReactArcgisHistogram extends Partial<Pick<ArcgisHistogram, "average" | "bins" | "colorBlendingEnabled" | "colorStops" | "dataLines" | "icon" | "label" | "layout" | "max" | "messageOverrides" | "min" | "standardDeviation">>, HTMLProps<ArcgisHistogram> {
}

interface ReactArcgisLabelInput extends Partial<Pick<ArcgisLabelInput, "alignment" | "labelFormatter" | "readOnly" | "value">>, HTMLProps<ArcgisLabelInput> {
  onarcgisChange?: EventHandler<ArcgisLabelInput["arcgisChange"]>;
}

interface ReactArcgisPickerInput extends Partial<Pick<ArcgisPickerInput, "disabled" | "heading" | "iconEnd" | "intlDone" | "label" | "popoverProps">>, HTMLProps<ArcgisPickerInput> {
  onarcgisPopoverClose?: EventHandler<ArcgisPickerInput["arcgisPopoverClose"]>;
  onarcgisPopoverOpen?: EventHandler<ArcgisPickerInput["arcgisPopoverOpen"]>;
}

interface ReactArcgisRampColor extends Partial<Pick<ArcgisRampColor, "layout" | "max" | "min" | "stops">>, HTMLProps<ArcgisRampColor> {
}

interface ReactArcgisRampColorBreak extends Partial<Pick<ArcgisRampColorBreak, "layout" | "max" | "min" | "stops">>, HTMLProps<ArcgisRampColorBreak> {
}

interface ReactArcgisRampOpacity extends Partial<Pick<ArcgisRampOpacity, "fillColor" | "layout" | "max" | "min" | "stops">>, HTMLProps<ArcgisRampOpacity> {
}

interface ReactArcgisSlider extends Partial<Pick<ArcgisSlider, "allowValuesOverlap" | "autoDestroyDisabled" | "disabled" | "fillPlacement" | "fullRangeMax" | "fullRangeMin" | "keyboardLargeStep" | "labelFormatter" | "layout" | "max" | "messageOverrides" | "min" | "mirrored" | "popoverLabel" | "popoverPlacement" | "precision" | "rangeLabelsEditingEnabled" | "rangeLabelsPlacement" | "segmentsDraggingDisabled" | "showRangeLabels" | "steps" | "valueLabelsDisplay" | "valueLabelsEditingEnabled" | "valueLabelsPlacement" | "values">>, HTMLProps<ArcgisSlider> {
  onarcgisActiveValueChange?: EventHandler<ArcgisSlider["arcgisActiveValueChange"]>;
  onarcgisChange?: EventHandler<ArcgisSlider["arcgisChange"]>;
  onarcgisInput?: EventHandler<ArcgisSlider["arcgisInput"]>;
  onarcgisRangeChange?: EventHandler<ArcgisSlider["arcgisRangeChange"]>;
}

interface ReactArcgisSliderInput extends Partial<Pick<ArcgisSliderInput, "disabled" | "flipLabels" | "label" | "max" | "min" | "step" | "unitsLabel" | "value" | "withSteppers">>, HTMLProps<ArcgisSliderInput> {
  onarcgisSliderInputValueChange?: EventHandler<ArcgisSliderInput["arcgisSliderInputValueChange"]>;
  onarcgisValueChange?: EventHandler<ArcgisSliderInput["arcgisValueChange"]>;
}

interface ReactArcgisSpatialReferencePicker extends Partial<Pick<ArcgisSpatialReferencePicker, "autoFilterToDefault" | "defaultWkid" | "filterEnabled" | "hideCategories" | "value">>, HTMLProps<ArcgisSpatialReferencePicker> {
  onarcgisChange?: EventHandler<ArcgisSpatialReferencePicker["arcgisChange"]>;
}

interface ReactArcgisSpatialReferencePickerTree extends Partial<Pick<ArcgisSpatialReferencePickerTree, "data" | "value">>, HTMLProps<ArcgisSpatialReferencePickerTree> {
  onarcgisChange?: EventHandler<ArcgisSpatialReferencePickerTree["arcgisChange"]>;
}

interface ReactArcgisTicks extends Partial<Pick<ArcgisTicks, "interactive" | "interpolationExponent" | "labelFormatter" | "labelPlacement" | "layout" | "max" | "min" | "mirrored" | "mode" | "showBaseline" | "showLabels" | "values">>, HTMLProps<ArcgisTicks> {
  onarcgisTickClick?: EventHandler<ArcgisTicks["arcgisTickClick"]>;
}

interface ReactArcgisUniqueValuesList extends Partial<Pick<ArcgisUniqueValuesList, "fieldName" | "layer" | "maxHeight" | "multiple" | "numberFormatOptions" | "partialUniqueValues" | "selectedValues" | "showFilterLength" | "sortBy" | "uniqueValues" | "view" | "visualizationSource">>, HTMLProps<ArcgisUniqueValuesList> {
  onarcgisChange?: EventHandler<ArcgisUniqueValuesList["arcgisChange"]>;
  onarcgisLoad?: EventHandler<ArcgisUniqueValuesList["arcgisLoad"]>;
  onarcgisSortByChange?: EventHandler<ArcgisUniqueValuesList["arcgisSortByChange"]>;
}

declare module "react" {
  namespace JSX {
    interface IntrinsicElements {
      "arcgis-ckeditor5": ReactArcgisCkeditor5;
      "arcgis-ckeditor5-popover": ReactArcgisCkeditor5Popover;
      "arcgis-color-input": ReactArcgisColorInput;
      "arcgis-field-info": ReactArcgisFieldInfo;
      "arcgis-field-pick-list": ReactArcgisFieldPickList;
      "arcgis-histogram": ReactArcgisHistogram;
      "arcgis-label-input": ReactArcgisLabelInput;
      "arcgis-picker-input": ReactArcgisPickerInput;
      "arcgis-ramp-color": ReactArcgisRampColor;
      "arcgis-ramp-color-break": ReactArcgisRampColorBreak;
      "arcgis-ramp-opacity": ReactArcgisRampOpacity;
      "arcgis-slider": ReactArcgisSlider;
      "arcgis-slider-input": ReactArcgisSliderInput;
      "arcgis-spatial-reference-picker": ReactArcgisSpatialReferencePicker;
      "arcgis-spatial-reference-picker-tree": ReactArcgisSpatialReferencePickerTree;
      "arcgis-ticks": ReactArcgisTicks;
      "arcgis-unique-values-list": ReactArcgisUniqueValuesList;
    }
  }
}
declare module "react/jsx-runtime" {
  namespace JSX {
    interface IntrinsicElements {
      "arcgis-ckeditor5": ReactArcgisCkeditor5;
      "arcgis-ckeditor5-popover": ReactArcgisCkeditor5Popover;
      "arcgis-color-input": ReactArcgisColorInput;
      "arcgis-field-info": ReactArcgisFieldInfo;
      "arcgis-field-pick-list": ReactArcgisFieldPickList;
      "arcgis-histogram": ReactArcgisHistogram;
      "arcgis-label-input": ReactArcgisLabelInput;
      "arcgis-picker-input": ReactArcgisPickerInput;
      "arcgis-ramp-color": ReactArcgisRampColor;
      "arcgis-ramp-color-break": ReactArcgisRampColorBreak;
      "arcgis-ramp-opacity": ReactArcgisRampOpacity;
      "arcgis-slider": ReactArcgisSlider;
      "arcgis-slider-input": ReactArcgisSliderInput;
      "arcgis-spatial-reference-picker": ReactArcgisSpatialReferencePicker;
      "arcgis-spatial-reference-picker-tree": ReactArcgisSpatialReferencePickerTree;
      "arcgis-ticks": ReactArcgisTicks;
      "arcgis-unique-values-list": ReactArcgisUniqueValuesList;
    }
  }
}
declare module "react/jsx-dev-runtime" {
  namespace JSX {
    interface IntrinsicElements {
      "arcgis-ckeditor5": ReactArcgisCkeditor5;
      "arcgis-ckeditor5-popover": ReactArcgisCkeditor5Popover;
      "arcgis-color-input": ReactArcgisColorInput;
      "arcgis-field-info": ReactArcgisFieldInfo;
      "arcgis-field-pick-list": ReactArcgisFieldPickList;
      "arcgis-histogram": ReactArcgisHistogram;
      "arcgis-label-input": ReactArcgisLabelInput;
      "arcgis-picker-input": ReactArcgisPickerInput;
      "arcgis-ramp-color": ReactArcgisRampColor;
      "arcgis-ramp-color-break": ReactArcgisRampColorBreak;
      "arcgis-ramp-opacity": ReactArcgisRampOpacity;
      "arcgis-slider": ReactArcgisSlider;
      "arcgis-slider-input": ReactArcgisSliderInput;
      "arcgis-spatial-reference-picker": ReactArcgisSpatialReferencePicker;
      "arcgis-spatial-reference-picker-tree": ReactArcgisSpatialReferencePickerTree;
      "arcgis-ticks": ReactArcgisTicks;
      "arcgis-unique-values-list": ReactArcgisUniqueValuesList;
    }
  }
}