export class CounterService {
    private static counter = 0;
    private static readonly MAX_LIMIT = 8000;

    static incrementBy(value: number): boolean {
        if (this.counter + value > this.MAX_LIMIT) {
            console.warn(`Cannot add ${value}. Counter would exceed ${this.MAX_LIMIT}.`);
            return false;
        }
        this.counter += value;
        console.log(`Incremented by ${value}. Current count: ${this.counter}`);
        return true;
    }

    static getCount(): number {
        return this.counter;
    }

    static reset(): void {
        this.counter = 0;
    }
}