export class FontPreview {
    constructor(inputSelector, previewSelector) {
        const input = document.querySelector(inputSelector);
        if (!input)
            throw new Error(`Input element "${inputSelector}" not found`);
        this.inputElement = input;
        this.previewElements = Array.from(document.querySelectorAll(previewSelector));
        this.initialize();
    }
    initialize() {
        this.inputElement.addEventListener("input", () => this.updatePreviewText());
        this.updatePreviewText();
    }
    updatePreviewText() {
        const value = this.inputElement.value ||
            "The quick brown fox jumps over the lazy dog.";
        this.previewElements.forEach((el) => {
            el.textContent = value;
        });
    }
}
//# sourceMappingURL=FontPreview.js.map