import { ObservableMap } from '@stencil/store';
import { AnyRecord } from "../../utils/types";
import { BaseManager } from '../BaseManager';
type IndexableElement = HTMLElement & AnyRecord;
export type SlWebComponent<S> = {
    el: IndexableElement;
    store?: ObservableMap<S>;
    state?: S;
    storeReady?: () => void;
};
/**
 * Provides a proxy object for a component to a store.
 * During construction, it installs a store on a given component (specifically
 * on its DOM node).
 * If the component is a child (e.g. "sl-metro-line-step"), it returns the
 * store of its parent (e.g. "sl-metro-line").
 * If no store is found, it creates a new one and installs it on the parent.
 * @param cmp Component that requests the store.
 *
 * More information on All Manager
 *
 * @param initialState Default state of this store.
 */
export declare class StoreManager<C extends SlWebComponent<S>, S extends AnyRecord> extends BaseManager<C, S> {
    private store;
    private timeout;
    private observer;
    private isInitializeStateWithCmp;
    constructor(cmp: C, initialState: S, searchParentGlobally?: boolean, isInitializeStateWithCmp?: boolean);
    destroy(): void;
    initializeStateWithCmp(cmp: C): void;
    initializeWithParentSearch(cmp: C, initialState: S, parentTagName: string): void;
    getOrWaitForParentElement(cmp: C, initialState: S, parentTagName: string): Promise<unknown>;
    createDefaultStore(cmp: C, initialState: S, currentEl: IndexableElement | null): void;
}
/**
 * Traverses up from a given element and compares each parent until first match.
 * @param el Element to start from.
 * @param selector A selector (can be a string, an element or a function).
 */
export declare function closest(el: Element | null, selector: string | Element | ((el: IndexableElement) => boolean)): Element | undefined;
export {};
