import { Context, GenericComplexEntity, GenericEntity } from './Entities'; import { YMapEntity, YMapGroupEntity } from './YMapEnities'; export type DomDetach = () => void; type DomContext = { attach(entity: GenericEntity, element: Element): DomDetach; }; export declare const DomContext: Context; export type DomContextDestroy = () => void; /** * @ignore * Creates DomContext for specified container for entity. * NB: Does not allow to change container element on the fly. */ export declare function createDomContext(containerEntity: GenericComplexEntity, containerElement: Element, containerEndElement?: Element): [ DomContext, DomContextDestroy ]; /** * Hook for providing DOM context in entity * @param entity - Entity to provide the DomContext * @param element - DOM element to attach * @param container - DOM element to provide to descendants in new DomContext * @returns Function that detaches the DOM element and DomContext from the entity */ export declare function useDomContext(entity: GenericComplexEntity, element: Element, container: Element | null): DomDetach; /** @deprecated Use {@link useDomContext} instead. */ export declare abstract class DomEntity extends YMapGroupEntity { protected _element?: TElement; private _detachDom?; private _destroyDomCtx?; constructor(props: TProps, children?: YMapEntity[]); protected _onAttach(): void; protected _onDetach(): void; protected _onUpdate(props: Partial): void; protected abstract _createDom(): TElement | { element: TElement; container: Element; containerEndElement?: Element; }; protected abstract _updateDom(element: TElement, props: Partial): void; protected _destroyDom(_element: TElement): void; } export {};