﻿import { TextBuilder } from './TextBuilder.js';

// Classes
export class Printer
{
    // By default all attributes and methods are public

    // Attributes
    private static _printCount: number;

    // Constructor
    // No constructor
    constructor()
    {
        throw new Error("This is a static class");
    }

    // Properties
    // Get and Set Accessors
    static get PrintCount(): number
    {
        return this._printCount;
    }

    // Methods

    static Print(value: any): void
    {
        if (value instanceof TextBuilder)
        {
            console.log("Printing " + value.Result);
        }
        else
        {
            console.log("Printing " + value);
        }
    }
}  