import { VegaSlimmer } from '../../../vega-slimmer/vega-slimmer-core';
import { VegaEventID } from '../event-id/vega-event-id';
declare type EventPreventOptions = {
  useCapture?: boolean;
  customPreventHandle?: (e: Event) => void;
};
/** The ChildNodesEventPreventSlimmer class prevents specified events from propagating to parent elements. */
export declare class ChildNodesEventPreventSlimmer extends VegaSlimmer {
  protected host: HTMLElement;
  private eventIds;
  private useCapture;
  private customPreventHandle;
  /**
   * the parent element of the child node, not the host of the component
   *
   * example: vega-checkbox-group
   * <vega-checkbox-group>
   *   <vega-flex>
   *     <vega-checkbox/>
   *     <vega-checkbox/>
   * ...
   * we need to prevent the event bubbles from vega-checkbox, the vega-flex could be a host element.
   */
  private getHostElement;
  private isEventListenerAdded;
  private disabled;
  /**
   * The constructor function takes in an array of event names and a function to get the parent element, and assigns them to the corresponding properties of the class.
   *
   * @param {VegaEventID[]} eventIds - The eventNames parameter is an array of VegaEventID that represents the names of the events that will be handled by the constructor.
   * @param {HTMLElement} getHostElement - The `getHostElement` parameter is a function that returns an `HTMLElement`. It is used to get the parent element where the events will be attached.
   * @param {boolean | EventPreventOptions} options - add event listener in capture or bubbles.
   * @param {boolean | EventPreventOptions} needSkipByDefault - should skip event prevent by default
   */
  constructor(eventIds: VegaEventID[], getHostElement: () => HTMLElement, options?: boolean | EventPreventOptions, needSkipByDefault?: boolean);
  /**
   * add event listener when component connected, we can call the method manually if the host element not ready when connectedCallback
   */
  setup(): void;
  /**
   * if the host element ready after component did load, then add the event listener again.
   */
  checkEventListenerStatus(): void;
  /**
   * remove the event listener when component disconnect
   */
  destroy(): void;
  /**
   * The function `setSkipEventPreventFlag` sets a flag on a host element to skip event prevention under certain conditions.
   */
  private setSkipEventPreventFlag;
  /**
   * add or remove the event from the parent element
   *
   * @param {'add'|'remove'} actionType add or remove
   */
  private addOrRemoveEventListener;
  /**
   * get the current event name
   *
   * @param {VegaEventID} eventId event id class
   * @returns {string} native or vega event name string
   */
  private getCurrentEventName;
  /**
   * The function shouldPrevent checks if a given event ID should be prevented based on whether it is a
   * native event and if it is enabled for the host.
   *
   * @param {VegaEventID} eventId - The `eventId` parameter is of type `VegaEventID`. It represents the ID of an event.
   * @returns {boolean} a boolean value.
   */
  private shouldPrevent;
  /**
   * prevent the child event
   *
   * @param {CustomEvent} event event object
   */
  private preventChildEvent;
  /**
   * The function `shouldSkipEventPrevent` checks if a host element has a specific dataset value to determine whether event prevention should be skipped.
   *
   * @returns {boolean} If the `hostElement` exists and has a `dataset.vegaNoEventPrevent` attribute with a value of `'true'`, then the function returns `true`. Otherwise, it returns `false`.
   */
  private shouldSkipEventPrevent;
}
export {};
