/// <reference types="@arcgis/core/interfaces.d.ts" />
import { EventEmitter } from '@arcgis/lumina';
import { Nil } from '@arcgis/components-utils';
import { ArcgisExpand } from '../components/arcgis-expand/customElement.js';
import { ArcgisLinkChart } from '../components/arcgis-link-chart/customElement.js';
import { ArcgisMap } from '../components/arcgis-map/customElement.js';
import { ArcgisPlacement } from '../components/arcgis-placement/customElement.js';
import { ArcgisScene } from '../components/arcgis-scene/customElement.js';
export type ArcgisReferenceElement = HTMLArcgisLinkChartElement | HTMLArcgisMapElement | HTMLArcgisSceneElement;
export type ArcgisParentElement = HTMLArcgisExpandElement | HTMLArcgisPlacementElement | ArcgisReferenceElement;
interface BaseComponentElement {
    referenceElement?: ArcgisReferenceElement | string;
    view?: __esri.LinkChartView | __esri.MapView | __esri.SceneView | Nil;
    position?: __esri.UIPosition;
}
export interface WidgetElement extends BaseComponentElement {
    el: HTMLElement & {
        childElem?: HTMLElement;
    };
    widget: any;
    _watchHandles: __esri.WatchHandle[];
}
/**
 * A type that represents either wrapped widget or a native map component. Used
 * in places where both need to be accepted.
 */
export type WidgetOrMapComponent = Pick<WidgetElement, "position" | "referenceElement" | "view"> & {
    el: HTMLElement & {
        view?: __esri.LinkChartView | __esri.MapView | __esri.SceneView | __esri.VideoView | Nil;
        parent?: ArcgisParentElement;
        childElem?: HTMLElement & {
            ownedBy?: HTMLElement;
        };
    };
    icon?: Nil | string;
    widget?: WidgetElement["widget"];
};
/** @deprecated Use this.manager.onLifecycle() instead */
export declare function addHandles(element: WidgetElement, handle: __esri.WatchHandle | __esri.WatchHandle[]): void;
/**
 * Find applicable arcgis-map, arcgis-scene, arcgis-expand or arcgis-placement
 * for the current component and attach to it
 *
 * @remarks
 * If the view property was set by the user directly (for backwards
 * comparability with MapView/SceneView), attachToParent() will return undefined
 * as attachToParent() is looking for component parents only.
 * If the view property was provided, the developer takes over the
 * responsibility of calling view.ui.add()
 */
export declare function attachToParent(component: WidgetOrMapComponent): ArcgisParentElement | undefined;
/**
 * Defines a view prop on the component's el and emits arcgisReady once that
 * prop is set by attachToParent()
 *
 * @deprecated Use useWidget or useViewModel instead
 */
export declare function defineViewProperty(component: WidgetOrMapComponent & {
    arcgisReady: EventEmitter;
}): void;
export declare function isNullOrEmptyString(value: nullish | string): boolean;
export declare function isValidInteger(value: nullish | number): boolean;
export declare function areCamerasEqual(camera: __esri.Camera, camera2: __esri.Camera | Nil): boolean;
export declare function isNotSameViewpoint(viewpoint?: __esri.Viewpoint, viewpoint2?: __esri.Viewpoint): boolean;
export declare function parseCenter(newValue: __esri.MapView["center"] | Nil | number[] | string, view?: Pick<__esri.MapView, "center">): __esri.Point | undefined;
export declare function parsePoint(currentValue: __esri.Point | Nil, newValue: __esri.Point | Nil | number[] | string): __esri.Point | undefined;
/** @deprecated Use useWidget or useViewModel instead */
export declare function referenceElementHelper(component: WidgetOrMapComponent, refElement: ArcgisReferenceElement | Nil | string): Promise<void>;
export declare const getRenderContainer: (component: Pick<WidgetOrMapComponent, "el">) => HTMLElement | undefined;
/**
 * Focuses the specified element while waiting for it to be rendered.
 * Copied from https://devtopia.esri.com/WebGIS/arcgis-js-api/blob/4master/esri/widgets/support/widgetUtils.ts#L339-L358
 * Minus the `abortOptions`
 */
export declare function setFocus(elementOrGetElement: Element | Nil | (() => Element | Nil)): Promise<void>;
export {};
