import { GenericController } from '../Controller.ts'; import { LitElement } from '../../LitElement.ts'; type Requires = LitElement & Omit, AlwaysOmit | OmitProps> & { autoDestroyDisabled: boolean; destroy: () => Promise; }; type AlwaysOmit = "addHandles" | "declaredClass" | "destroyed" | "hasHandles" | "initialized" | "removeHandles" | "set" | "watch"; /** * Given an Accessor class, create a controller that will do two-way binding of * props between the component and the Accessor. * * See https://webgis.esri.com/references/lumina/controllers/useAccessor for * documentation & examples. */ export declare const makeAccessorController: (createInstance: ((props?: Props) => Accessor) | (new (props?: Props) => Accessor), _options?: { /** * By default, to ensure that you didn't accidentally forget to bind any * of the Accessor's properties on your component, every property that * is accepted by the Accessor's constructor will be required to be bound * on your component. If you do not wish to bind certain properties * (or you wish to bind them but with a different type), you can omit * them using this option. * * You can also bind the property to \@state rather than \@property if you * wish to use it internally only: * @example * ```tsx * \@State() timeZone = this.viewModel.timeZone; * ``` * * @remarks * This option affects the TypeScript error checking only - it has * no runtime impact. Thus, if you wish to save a few bytes in the * bundle, rather than simply setting this property like * `makeAccessorController(..., { omitProps: ["propName"] })`, you can * set it like this: * `makeAccessorController(..., {} as { omitProps: ["propName"] })` */ omitProps: OmitProps[]; }) => (component: Requires) => Accessor; export declare class AccessorController> extends GenericController> { #private; protected instance: Accessor; /** * Use getAccessorControllerBoundProperties() helper to get access to this map * @private */ _boundAccessorProperties: Map; /** @private */ _currentlyBindingPropertyName?: string; /** * (development only) Allow these props to mismatch the name of the Accessor's * property to avoid collisions * * @private */ static devOnly$allowedPropNameMismatches?: ReadonlySet; get exports(): Accessor; set exports(value: Accessor); constructor(component: ExtraRequires & Requires, createInstance: ((props?: Props) => Accessor) | (new (props?: Props) => Accessor)); /** @private */ _createAccessorInstance(): void; hostConnected(): void; hostDestroy(): void; } type MinimalAccessorController = Pick, "_currentlyBindingPropertyName" | "exports"> & { component: LitElement; }; export declare const makeBinderProxy: (component: LitElement, accessorControllerRef: WeakRef; }; }>, accessorControllerIndex: number, instance: __esri.Accessor, boundProperties: Map) => unknown; export declare const getAccessorControllerBoundProperties: (controller: AccessorController) => Map; export declare const reCreateAccessor: (instance: __esri.Accessor, component: LitElement) => void; export {};