import {IVisualContainer} from "../../interfaces/verification-system-interfaces.js"; /** * Web implementation of IVisualContainer using HTMLElement */ export class WebVisualContainer implements IVisualContainer { private readonly element: HTMLElement; /** * Create a new web visual container * @param element - The HTML element to use as a container */ constructor(element: HTMLElement) { this.element = element; } /** * Get the width of the container */ public getWidth(): number { return this.element.clientWidth; } /** * Get the height of the container */ public getHeight(): number { return this.element.clientHeight; } /** * Get the underlying HTML element */ public getElement(): HTMLElement { return this.element; } public getBoundingClientRect(): DOMRect { return this.element.getBoundingClientRect(); } }