/// <reference types="@geoscene/core/interfaces.d.ts" />
import { AccessorController } from '@arcgis/lumina/controllers/accessor';
import { Nil } from '@arcgis/components-utils';
import { default as GeosceneMap } from '@geoscene/core/Map';
import { GeosceneReferenceElement } from '../utils/component-utils';
import { LitElement, EventEmitter } from '@arcgis/lumina';
import { PropertyValues } from 'lit';
type Requires<Props, Widget extends WidgetInstance> = LitElement & Pick<Widget, keyof Props & keyof Widget> & Uses<Widget>;
type WidgetInstance = __geoscene.Widget & {
    state?: string;
    viewModel?: __geoscene.Accessor & {
        state?: string;
        view?: __geoscene.LinkChartView | __geoscene.MapView | __geoscene.SceneView | Nil;
        map?: GeosceneMap | Nil;
    };
    view?: __geoscene.LinkChartView | __geoscene.MapView | __geoscene.SceneView | Nil;
    map?: GeosceneMap | Nil;
    visibleElements?: Record<never, unknown>;
};
type Uses<Widget extends WidgetInstance> = {
    state?: Exclude<Widget["viewModel"], Nil>["state"] | Widget["state"];
    viewModel?: Widget["viewModel"];
    closed?: boolean;
    icon: Nil | string;
    label: Nil | string;
    referenceElement?: GeosceneReferenceElement | string;
    position: __geoscene.UIPosition;
    geosceneReady: EventEmitter;
    geoscenePropertyChange: EventEmitter<{
        name: string;
    }> | undefined;
    el: HTMLElement & {
        childElem?: HTMLElement & {
            ownedBy?: HTMLElement;
        };
        view?: __geoscene.LinkChartView | __geoscene.MapView | __geoscene.SceneView;
    };
    autoDestroyDisabled: boolean;
    destroy: () => Promise<void>;
};
/**
 * A controller for a wrapped JS API Widget
 * - loads the widget
 * - initializes the widget with the component's properties
 * - does two-way binding between widget and component properties
 * - re-emits the widgets's events on the component
 * - type-checks everything ✨
 *
 * Documentation:
 * https://qawebgis.geoscene.cn/components/lumina/transition-from-widgets#usewidget-controller
 */
export declare const makeWidgetController: <Props, Widget extends WidgetInstance, OmitProps extends string = never>(createWidget: ((props?: Props) => Widget) | (new (props?: Props) => Widget), _options?: {
    /**
     * Don't expose the following Widget's properties on the component.
     * You can also bind the property to \@State rather than \@Prop if you
     * wish to use it internally only:
     *
     * @example
     * \@state() timeZone = this.widget.timeZone;
     */
    omitProps: OmitProps[];
}) => (component: Requires<Omit<Props, OmitProps | "container" | "id" | "view" | "visible" | "visibleElements">, Widget>) => Widget;
export declare class WidgetController<Props, Widget extends WidgetInstance> extends AccessorController<Props, Widget, Uses<Widget>> {
    #private;
    constructor(component: Requires<Props, Widget> & Uses<Widget>, createWidget: ((props?: Props) => Widget) | (new (props?: Props) => Widget));
    hostConnected(): void;
    hostLoad(): void;
    hostUpdate(changes: PropertyValues<Uses<Widget>>): void;
    hostLoaded(): void;
    hostDestroy(): void;
}
export {};