"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
class ProjectVariant {
    _data;
    _isDefault;
    _project;
    constructor(parent, data) {
        this._project = parent;
        this._data = data;
        this._isDefault = this._data.label === "";
    }
    static canonicalizeVariantLabel(variantLabel) {
        return variantLabel.toLowerCase().trim();
    }
    get isDefault() {
        return this._isDefault;
    }
    get effectiveUnifiedTier() {
        if (this.memoryPerformanceTier !== undefined) {
            return this.memoryPerformanceTier;
        }
        if (this.memoryTier === undefined) {
            return undefined;
        }
        // per specified mappings of previous subpack tiers (where each number corresponds to 512mb of device memory)
        // to updated, broader, unified tiers that adds in device profile info
        if (this.memoryTier < 11) {
            return 0;
        }
        if (this.memoryTier <= 11) {
            return 1;
        }
        if (this.memoryTier <= 12) {
            return 2;
        }
        if (this.memoryTier <= 18) {
            return 3;
        }
        if (this.memoryTier <= 31) {
            return 4;
        }
        return 5;
    }
    get memoryPerformanceTier() {
        return this._data.memoryPerformanceTier;
    }
    set memoryPerformanceTier(newTier) {
        this._data.memoryPerformanceTier = newTier;
    }
    get memoryTier() {
        return this._data.memoryTier;
    }
    set memoryTier(newTier) {
        this._data.memoryTier = newTier;
    }
    get title() {
        return this._data.title;
    }
    set title(newTitle) {
        this._data.title = newTitle;
    }
}
exports.default = ProjectVariant;

//# sourceMappingURL=../maps/app/ProjectVariant.js.map
