import { BaseChart as e } from "./charts/base.js";
import { ChartLegend as t } from "./charts/legend.js";
import { ChartTooltip as n } from "./charts/tooltip.js";
//#region src/charts/interactive.ts
var r = class extends e {
	tooltip;
	legend;
	boundMouseMove;
	boundMouseLeave;
	constructor(e) {
		super(e), e.tooltip?.enabled === !1 ? this.tooltip = null : this.tooltip = new n(this.container), e.legend === void 0 ? this.legend = null : this.legend = new t(this.container, e.legend), this.boundMouseMove = (e) => {
			this.handleMouseMove(e);
		}, this.boundMouseLeave = () => {
			this.handleMouseLeave();
		}, this.canvas.addEventListener("mousemove", this.boundMouseMove), this.canvas.addEventListener("mouseleave", this.boundMouseLeave);
	}
	destroy() {
		this.canvas.removeEventListener("mousemove", this.boundMouseMove), this.canvas.removeEventListener("mouseleave", this.boundMouseLeave), this.legend !== null && this.legend.destroy(), this.tooltip !== null && this.tooltip.destroy(), super.destroy();
	}
};
//#endregion
export { r as t };

//# sourceMappingURL=interactive-C6OMqZhG.js.map