"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.cast_de_nrw_schule_svws_core_types_RGBFarbe = exports.RGBFarbe = void 0;
const JavaObject_1 = require("../../java/lang/JavaObject");
class RGBFarbe extends JavaObject_1.JavaObject {
    red = 0;
    green = 0;
    blue = 0;
    /**
     * Implementation for method overloads of 'constructor'
     */
    constructor(__param0, __param1, __param2) {
        super();
        if (((typeof __param0 !== "undefined") && typeof __param0 === "number") && (typeof __param1 === "undefined") && (typeof __param2 === "undefined")) {
            let color24Bit = __param0;
            if (color24Bit === 0) {
                this.red = this.green = this.blue = 255;
            }
            else {
                this.red = color24Bit & 255;
                this.green = (color24Bit >> 8) & 255;
                this.blue = color24Bit >> 16;
            }
        }
        else if (((typeof __param0 !== "undefined") && typeof __param0 === "number") && ((typeof __param1 !== "undefined") && typeof __param1 === "number") && ((typeof __param2 !== "undefined") && typeof __param2 === "number")) {
            let red = __param0;
            let green = __param1;
            let blue = __param2;
            this.red = red;
            this.green = green;
            this.blue = blue;
        }
        else
            throw new Error('invalid method overload');
    }
    toString() {
        return "rgb(" + this.red + ", " + this.green + ", " + this.blue + ")";
    }
    /**
     *
     * Holt den Wert des Farbwerts rot
     *
     * @return Farbwert rot
     */
    getRed() {
        return this.red;
    }
    /**
     *
     * Bestimmt den Farbwert für rot
     *
     * @param red          Farbwert rot
     *
     */
    setRed(red) {
        this.red = red;
    }
    /**
     *
     * Holt den Wert des Farbwerts grün
     *
     * @return Farbwert grün
     */
    getGreen() {
        return this.green;
    }
    /**
     *
     * Bestimmt den Farbwert für grün
     *
     * @param green          Farbwert grün
     *
     */
    setGreen(green) {
        this.green = green;
    }
    /**
     *
     * Holt den Wert des Farbwerts blau
     *
     * @return Farbwert blau
     */
    getBlue() {
        return this.blue;
    }
    /**
     *
     * Bestimmt den Farbwert für blau
     *
     * @param blue          Farbwert blau
     *
     */
    setBlue(blue) {
        this.blue = blue;
    }
    isTranspiledInstanceOf(name) {
        return ['de.nrw.schule.svws.core.types.RGBFarbe'].includes(name);
    }
}
exports.RGBFarbe = RGBFarbe;
function cast_de_nrw_schule_svws_core_types_RGBFarbe(obj) {
    return obj;
}
exports.cast_de_nrw_schule_svws_core_types_RGBFarbe = cast_de_nrw_schule_svws_core_types_RGBFarbe;
//# sourceMappingURL=RGBFarbe.js.map