import { AppObjectEntity, Color, getSingletonComponent, MemoizedColor, } from "@vived/core";
export var ThemeColorType;
(function (ThemeColorType) {
    ThemeColorType["primary"] = "primary";
    ThemeColorType["onPrimary"] = "onPrimary";
    ThemeColorType["primaryContainer"] = "primaryContainer";
    ThemeColorType["onPrimaryContainer"] = "onPrimaryContainer";
    ThemeColorType["primaryFixed"] = "primaryFixed";
    ThemeColorType["onPrimaryFixed"] = "onPrimaryFixed";
    ThemeColorType["primaryFixedDim"] = "primaryFixedDim";
    ThemeColorType["onPrimaryFixedVariant"] = "onPrimaryFixedVariant";
    ThemeColorType["secondary"] = "secondary";
    ThemeColorType["onSecondary"] = "onSecondary";
    ThemeColorType["secondaryContainer"] = "secondaryContainer";
    ThemeColorType["onSecondaryContainer"] = "onSecondaryContainer";
    ThemeColorType["secondaryFixed"] = "secondaryFixed";
    ThemeColorType["onSecondaryFixed"] = "onSecondaryFixed";
    ThemeColorType["secondaryFixedDim"] = "secondaryFixedDim";
    ThemeColorType["onSecondaryFixedVariant"] = "onSecondaryFixedVariant";
    ThemeColorType["tertiary"] = "tertiary";
    ThemeColorType["onTertiary"] = "onTertiary";
    ThemeColorType["tertiaryContainer"] = "tertiaryContainer";
    ThemeColorType["onTertiaryContainer"] = "onTertiaryContainer";
    ThemeColorType["tertiaryFixed"] = "tertiaryFixed";
    ThemeColorType["onTertiaryFixed"] = "onTertiaryFixed";
    ThemeColorType["tertiaryFixedDim"] = "tertiaryFixedDim";
    ThemeColorType["onTertiaryFixedVariant"] = "onTertiaryFixedVariant";
    ThemeColorType["error"] = "error";
    ThemeColorType["onError"] = "onError";
    ThemeColorType["errorContainer"] = "errorContainer";
    ThemeColorType["onErrorContainer"] = "onErrorContainer";
    ThemeColorType["outline"] = "outline";
    ThemeColorType["background"] = "background";
    ThemeColorType["onBackground"] = "onBackground";
    ThemeColorType["surface"] = "surface";
    ThemeColorType["onSurface"] = "onSurface";
    ThemeColorType["surfaceVariant"] = "surfaceVariant";
    ThemeColorType["onSurfaceVariant"] = "onSurfaceVariant";
    ThemeColorType["inverseSurface"] = "inverseSurface";
    ThemeColorType["inverseOnSurface"] = "inverseOnSurface";
    ThemeColorType["inversePrimary"] = "inversePrimary";
    ThemeColorType["shadow"] = "shadow";
    ThemeColorType["surfaceTint"] = "surfaceTint";
    ThemeColorType["outlineVariant"] = "outlineVariant";
    ThemeColorType["scrim"] = "scrim";
    ThemeColorType["surfaceContainerHighest"] = "surfaceContainerHighest";
    ThemeColorType["surfaceContainerHigh"] = "surfaceContainerHigh";
    ThemeColorType["surfaceContainer"] = "surfaceContainer";
    ThemeColorType["surfaceContainerLow"] = "surfaceContainerLow";
    ThemeColorType["surfaceContainerLowest"] = "surfaceContainerLowest";
    ThemeColorType["surfaceBright"] = "surfaceBright";
    ThemeColorType["surfaceDim"] = "surfaceDim";
})(ThemeColorType || (ThemeColorType = {}));
export class ThemeColors extends AppObjectEntity {
}
ThemeColors.type = "ThemeColors";
ThemeColors.get = (appObjects) => getSingletonComponent(ThemeColors.type, appObjects);
export function makeThemeColors(appObject) {
    return new ThemeColorsImp(appObject);
}
class ThemeColorsImp extends ThemeColors {
    constructor(appObject) {
        super(appObject, ThemeColors.type);
        this.memoizedColorLookup = new Map();
        this.getColorForType = (type) => {
            const memoizedColor = this.memoizedColorLookup.get(type);
            if (memoizedColor) {
                return memoizedColor.val;
            }
            // Edge case. Not sure how to even get here.
            console.warn("[ThemeColors] Unknown color type " + type);
            return Color.RGBA(0, 0, 0, 0);
        };
        this.setColorForType = (type, val) => {
            const memoizedColor = this.memoizedColorLookup.get(type);
            if (!memoizedColor) {
                // Edge case. Not sure how to even get here.
                return;
            }
            memoizedColor.val = val;
        };
        this.setColorHexForType = (type, hex) => {
            const memoizedColor = this.memoizedColorLookup.get(type);
            if (!memoizedColor) {
                // Edge case. Not sure how to even get here.
                return;
            }
            memoizedColor.val = Color.Hex(hex);
        };
        for (const themeColor in ThemeColorType) {
            const memoizedColor = new MemoizedColor(Color.RGBA(0, 0, 0, 0), this.notifyOnChange);
            this.memoizedColorLookup.set(themeColor, memoizedColor);
        }
        const colorsSet = new Map();
        colorsSet.set(ThemeColorType.primary, "#00668A");
        colorsSet.set(ThemeColorType.onPrimary, "#FFFFFF");
        colorsSet.set(ThemeColorType.primaryContainer, "#C4E7FF");
        colorsSet.set(ThemeColorType.onPrimaryContainer, "#001E2C");
        colorsSet.set(ThemeColorType.primaryFixed, "#C4E7FF");
        colorsSet.set(ThemeColorType.onPrimaryFixed, "#001E2C");
        colorsSet.set(ThemeColorType.primaryFixedDim, "#7BD0FF");
        colorsSet.set(ThemeColorType.onPrimaryFixedVariant, "#004C69");
        colorsSet.set(ThemeColorType.secondary, "#4E616D");
        colorsSet.set(ThemeColorType.onSecondary, "#FFFFFF");
        colorsSet.set(ThemeColorType.secondaryContainer, "#D1E5F4");
        colorsSet.set(ThemeColorType.onSecondaryContainer, "#0A1E28");
        colorsSet.set(ThemeColorType.secondaryFixed, "#D1E5F4");
        colorsSet.set(ThemeColorType.onSecondaryFixed, "#0A1E28");
        colorsSet.set(ThemeColorType.secondaryFixedDim, "#B5C9D7");
        colorsSet.set(ThemeColorType.onSecondaryFixedVariant, "#374955");
        colorsSet.set(ThemeColorType.tertiary, "#605A7D");
        colorsSet.set(ThemeColorType.onTertiary, "#FFFFFF");
        colorsSet.set(ThemeColorType.tertiaryContainer, "#E6DEFF");
        colorsSet.set(ThemeColorType.onTertiaryContainer, "#1D1736");
        colorsSet.set(ThemeColorType.tertiaryFixed, "#E6DEFF");
        colorsSet.set(ThemeColorType.onTertiaryFixed, "#1D1736");
        colorsSet.set(ThemeColorType.tertiaryFixedDim, "#CAC1E9");
        colorsSet.set(ThemeColorType.onTertiaryFixedVariant, "#484264");
        colorsSet.set(ThemeColorType.error, "#BA1A1A");
        colorsSet.set(ThemeColorType.onError, "#FFFFFF");
        colorsSet.set(ThemeColorType.errorContainer, "#FFDAD6");
        colorsSet.set(ThemeColorType.onErrorContainer, "#410002");
        colorsSet.set(ThemeColorType.outline, "#71787D");
        colorsSet.set(ThemeColorType.background, "#FBFCFF");
        colorsSet.set(ThemeColorType.onBackground, "#191C1E");
        colorsSet.set(ThemeColorType.surface, "#F8F9FC");
        colorsSet.set(ThemeColorType.onSurface, "#191C1E");
        colorsSet.set(ThemeColorType.surfaceVariant, "#DCE3E9");
        colorsSet.set(ThemeColorType.onSurfaceVariant, "#41484D");
        colorsSet.set(ThemeColorType.inverseSurface, "#2E3133");
        colorsSet.set(ThemeColorType.inverseOnSurface, "#F0F1F3");
        colorsSet.set(ThemeColorType.inversePrimary, "#7BD0FF");
        colorsSet.set(ThemeColorType.shadow, "#000000");
        colorsSet.set(ThemeColorType.surfaceTint, "#00668A");
        colorsSet.set(ThemeColorType.outlineVariant, "#C0C7CD");
        colorsSet.set(ThemeColorType.scrim, "#000000");
        colorsSet.set(ThemeColorType.surfaceContainerHighest, "#E1E2E5");
        colorsSet.set(ThemeColorType.surfaceContainerHigh, "#E7E8EA");
        colorsSet.set(ThemeColorType.surfaceContainer, "#EDEEF0");
        colorsSet.set(ThemeColorType.surfaceContainerLow, "#F3F3F6");
        colorsSet.set(ThemeColorType.surfaceContainerLowest, "#FFFFFF");
        colorsSet.set(ThemeColorType.surfaceBright, "#F8F9FC");
        colorsSet.set(ThemeColorType.surfaceDim, "#D9DADC");
        this.setColorHexForSet(colorsSet);
    }
    setColorHexForSet(colorSet) {
        colorSet.forEach((val, key) => {
            this.setColorHexForType(key, val);
        });
    }
}
//# sourceMappingURL=ThemeColors.js.map