import { ChartOptions } from '../../types/vega-chart';
import { BaseDrawer } from './drawers/base-drawer';
import { BaseRenderer } from './renderers/base-renderer';
import { BaseInteractor } from './interactors/base-interactor';
/** This is a TypeScript class called `BaseChart` that serves as a base class for creating charts */
export declare abstract class BaseChart<T> {
  protected options: ChartOptions<T>;
  protected isLayoutSet: boolean;
  protected renderer: BaseRenderer<SVGElement | HTMLCanvasElement>;
  protected drawers: BaseDrawer<unknown>[];
  protected interactor: BaseInteractor<SVGElement | HTMLCanvasElement>;
  private dimensionController;
  /**
   * This is a constructor function that initializes a chart with options and creates a chain of drawers for rendering.
   *
   * @param {ChartOptions<unknown>} options - generic type that represents the configuration options for the chart
   */
  constructor(options: ChartOptions<T>);
  /**
   * The function clears the renderer.
   */
  clear(): void;
  /**
   * This function updates the chart options, creates a new drawer chain, resets the layout, and renders the chart.
   *
   * @param {ChartOptions<unknown>} options - ChartOptions<T> is a generic type that represents the configuration options for a
   * chart. It can include properties such as the chart type, data, labels, colors, and other stylingoptions
   */
  updateOptions(options: ChartOptions<T>): void;
  /**
   * re render the chart using existing options
   */
  reRender(): void;
  /**
   * sets the layout if it hasn't been set yet, and executes all the drawers. unregister the interactor by drawer
   */
  render(): void;
  /**
   * sets the layout of a renderer using the options provided.
   */
  protected setLayout(): void;
  /**
   * This function initializes layout options for a chart.
   *
   * @param {ChartOptions} options - ChartOptions<T> is a generic type that represents the configuration options for a
   * chart. It includes properties such as data, layout, and style.
   */
  private initLayoutOptions;
  /**
   * This function un-registers drawers from the interactor.
   */
  private unregisterByDrawer;
  /**
   * create a chain of `BaseDrawer` objects that will be used to draw the chart
   *
   * @param {BaseRenderer<SVGElement | HTMLCanvasElement>} renderer svg or canvas renderer
   * @param {BaseInteractor<SVGElement | HTMLCanvasElement>} interactor svg or canvas interactor
   * @returns {BaseDrawer<unknown>[]} drawer array
   */
  abstract createDrawerChain(renderer: BaseRenderer<SVGElement | HTMLCanvasElement>, interactor: BaseInteractor<SVGElement | HTMLCanvasElement>): BaseDrawer<unknown>[];
}
