import { BaseDrawer } from './base-drawer';
/** The TextDrawer class draws a text on a chart using provided options. */
export class TextDrawer extends BaseDrawer {
  /** This function adds interaction support */
  // eslint-disable-next-line @typescript-eslint/no-empty-function
  addInteractionSupport() { }
  /**
   * This function draws a text on a chart using specified options.
   */
  draw() {
    const options = this.options.renderOptions;
    options.forEach((item) => {
      const { position, text, styleToken, textAnchor, rotate } = item;
      this.renderer.drawText(position, text, this.getStyleTextFromToken(styleToken), textAnchor, rotate);
    });
  }
}
