import { ECanvasEventType, ICanvasDrawImage, IDrawEllipse, IDrawRect } from "../common-types";
import { CanvasObject } from "./GameObject";
import Grid from "./Grid";
export declare class Canvas {
    canvas: HTMLCanvasElement;
    context: CanvasRenderingContext2D;
    canvasWidth: number;
    canvasHeight: number;
    private objects;
    private isRerender;
    grid: Grid;
    constructor(id: string);
    render: () => void;
    enableEventListeners: () => void;
    setObject: <TBase extends CanvasObject<Record<string, any>>>(object: TBase) => void;
    updateMap: () => void;
    removeObject: (object: any) => void;
    private drawObjects;
    private setCanvasSize;
    drawRect: IDrawRect;
    drawEllipse: IDrawEllipse;
    drawImage: ICanvasDrawImage;
    objectEvents: {
        mousedown: (object: CanvasObject, e: MouseEvent) => void;
        mouseup: (object: CanvasObject, e: MouseEvent) => void;
        mouseover: (object: CanvasObject, e: MouseEvent) => void;
        mouseout: (object: CanvasObject, e: MouseEvent) => void;
    };
    getCoordinate: (e: MouseEvent, type: 'x' | 'y') => number;
    addEventListener: (type: ECanvasEventType, listener: (e: {
        naturalEvent: Event;
        x: number;
        y: number;
    }) => void) => void;
}
export default Canvas;
