export class ElementCapturing {
    #element;
    #capturing;
    constructor(element, capturing) {
        this.#element = element;
        this.#capturing = capturing;
    }
    get element() { return this.#element; }
    get capturing() { return this.#capturing; }
    captureEvent(event) {
        return this.capturePoint(event.clientX, event.clientY);
    }
    capturePoint(clientX, clientY) {
        const { left, top } = this.#element.getBoundingClientRect();
        return this.captureLocalPoint(clientX - left, clientY - top);
    }
    captureLocalPoint(x, y) { return this.#capturing.capture(x, y); }
}
