/**
 * A UI counter button component.
 * Tracks a count that can be incremented, decremented, and reset.
 */
export class CounterButton {
    count = 0;
    label;
    /**
     * Create a new CounterButton.
     * @param label - Display label for the button (default: "Counter")
     */
    constructor(label = 'Counter') {
        this.label = label;
    }
    /**
     * Increment the counter by 1.
     */
    press() {
        this.count++;
    }
    /**
     * Decrement the counter by 1.
     */
    unpress() {
        this.count--;
    }
    /**
     * Reset the counter to 0.
     */
    reset() {
        this.count = 0;
    }
    /**
     * Render the button as a string.
     * @returns Formatted string like `[ Counter: 5 ]`
     */
    render() {
        return `[ ${this.label}: ${this.count} ]`;
    }
    /**
     * String representation (alias for render).
     * @returns Formatted string like `[ Counter: 5 ]`
     */
    toString() {
        return this.render();
    }
}
//# sourceMappingURL=counter-button.js.map