import { AppObjectEntity, Color, MemoizedString, } from "@vived/core";
export var OverlayColorEnums;
(function (OverlayColorEnums) {
    OverlayColorEnums["GREEN"] = "Green";
    OverlayColorEnums["PINK"] = "Pink";
    OverlayColorEnums["YELLOW"] = "Yellow";
    OverlayColorEnums["RED"] = "Red";
    OverlayColorEnums["BLUE"] = "Blue";
    OverlayColorEnums["WHITE"] = "White";
    OverlayColorEnums["PURPLE"] = "Purple";
    OverlayColorEnums["BLACK"] = "Black";
    OverlayColorEnums["ORANGE"] = "Orange";
    OverlayColorEnums["NONE"] = "None";
})(OverlayColorEnums || (OverlayColorEnums = {}));
export class OverlayColor extends AppObjectEntity {
    static overlayColorEnumToColor(colorEnum) {
        return this.enumToColorLookup.get(colorEnum);
    }
    static addIfMissing(appObj) {
        const existing = appObj.getComponent(this.type);
        if (existing) {
            return existing;
        }
        else {
            return new OverlayColor(appObj);
        }
    }
    static get(appObj) {
        return appObj.getComponent(this.type);
    }
    static getByID(id, appObjects) {
        return appObjects.get(id)?.getComponent(this.type);
    }
    get overlayColor() {
        return this.memoizedColor.val;
    }
    set overlayColor(val) {
        this.memoizedColor.val = val;
    }
    constructor(appObject) {
        super(appObject, OverlayColor.type);
        this.memoizedColor = new MemoizedString(OverlayColorEnums.NONE, this.notifyOnChange);
    }
}
OverlayColor.type = "OVERLAY_COLOR";
OverlayColor.enumToColorLookup = new Map([
    [OverlayColorEnums.GREEN, Color.Hex("#008000")],
    [OverlayColorEnums.PINK, Color.Hex("#FFC0CB")],
    [OverlayColorEnums.YELLOW, Color.Hex("#FFFF00")],
    [OverlayColorEnums.RED, Color.Hex("#FF0000")],
    [OverlayColorEnums.BLUE, Color.Hex("#0000FF")],
    [OverlayColorEnums.WHITE, Color.Hex("#FFFFFF")],
    [OverlayColorEnums.PURPLE, Color.Hex("#800080")],
    [OverlayColorEnums.BLACK, Color.Hex("#000000")],
    [OverlayColorEnums.ORANGE, Color.Hex("#FFA500")],
]);
//# sourceMappingURL=OverlayColor.js.map