import { VegaSlimmer } from '../../../vega-slimmer/vega-slimmer-core';
import { HTMLStencilElement } from '../../../stencil-public-runtime';
export declare type SubStateObserverEntry = {
  parent: string | (() => HTMLElement);
  subStates: SubStateEntry[];
  pullStatesWhenReattached?: boolean;
};
export declare type SubStateEntry = {
  subStateName: string;
  parentStateName: string;
  callback?: (value: unknown) => void;
};
export declare type SubStateObserverPayload = {
  host: HTMLStencilElement;
  stateName: string;
  value: unknown;
};
export declare type SubStateFetchPayload = {
  host: HTMLStencilElement;
  stateName: string;
  callback: (value: unknown) => void;
};
/**
 * The subState observer that to sync up the parent state to the children components.
 */
export declare class SubStateObserverSlimmer<T extends HTMLStencilElement> extends VegaSlimmer {
  host: T;
  private subStateObserver;
  private readonly observerEntry;
  private parent;
  /**
   * Initialize the subState observer.
   */
  connectedCallback(): void;
  /**
   * Unregister the observer when disconnectedCallback
   */
  disconnectedCallback(): void;
  /**
   * Fetch the parent props when componentWillLoad
   */
  componentWillLoad(): void;
  /**
   * @param {SubStateObserverEntry} observerEntry - observerEntry is the object that contains the parent state and the state name.
   */
  constructor(observerEntry: SubStateObserverEntry);
  /**
   * The function checks if the input object has a 'host' property that matches the parent host and a 'stateName' property.
   *
   * @param {unknown} input - The `input` parameter is of type `unknown`, which means it can be any type.
   * @returns {boolean} a boolean value indicating whether the input is an acceptable observer payload.
   */
  private isAcceptableObserverPayload;
  /**
   * The function `getParent` returns the parent element of a given host element, based on the observer
   * entry and appender element.
   *
   * @returns {Nullable<HTMLElement>} the parent HTMLElement.
   */
  private getParent;
  /**
   * Update the state with new value
   *
   * @param {SubStateEntry} subState - current state entry
   * @param {unknown} value - new value
   */
  private updateState;
  /**
   * The `pullStates` function iterates through subStates and notifies the ChangeManager to update the
   * state based on the callback function provided.
   *
   * @returns {void} If the `this.parent` property is falsy, the `pullStates` method will return early and not
   * execute the rest of the code inside the method.
   */
  private pullStates;
}
