import Buffer from "../_Utilities/Buffer";
import Database from "../_Utilities/Database";
import { progression_generator_main_island } from "./Data/progression_generator_main_island";
import { EProgression_Type } from "./Enums/EProgression_Type";
export default class Progression_Manager {
    static get(progression_ID) {
        let progression = Buffer.get_Data("bae71320-f914-45f2-9c45-23dcafe8a7dd", progression_ID);
        if (progression != undefined)
            return progression;
        const data = Database.load(progression_ID);
        if (data == undefined)
            return undefined;
        progression = JSON.parse(Database.load(progression_ID));
        this.set(progression);
        return progression;
    }
    static set(progression) {
        Buffer.set_Data("bae71320-f914-45f2-9c45-23dcafe8a7dd", progression.id, progression);
        Database.save(progression.id, JSON.stringify(progression));
    }
    static initialize() {
        if (this.get("07b1d6ae-6288-4d5c-93fb-d10737e6f2c0") == undefined)
            this.set(progression_generator_main_island);
        if (this.get("3c61a262-04d4-4552-a57f-4e8641ffcdaf") == undefined) {
            const progression = {
                id: "3c61a262-04d4-4552-a57f-4e8641ffcdaf",
                type: EProgression_Type.quest,
                active_Task: 0,
                defeated: 0,
            };
            this.set(progression);
        }
        if (this.get("b2250c81-bed4-4b45-be7f-e9db5cee7c12") == undefined) {
            const progression = {
                id: "b2250c81-bed4-4b45-be7f-e9db5cee7c12",
                type: EProgression_Type.quest,
                active_Task: 0,
                defeated: 0,
            };
            this.set(progression);
        }
        if (this.get("b94b54b8-a1c9-44db-998a-9079c3d2abc0") == undefined) {
            const progression = {
                id: "b94b54b8-a1c9-44db-998a-9079c3d2abc0",
                type: EProgression_Type.quest,
                active_Task: 0,
                defeated: 0,
            };
            this.set(progression);
        }
        if (this.get("6402f0dd-d30d-4cf8-87e2-2c040913f191") == undefined) {
            const progression = {
                id: "6402f0dd-d30d-4cf8-87e2-2c040913f191",
                type: EProgression_Type.quest,
                active_Task: 0,
                defeated: 0,
            };
            this.set(progression);
        }
        if (this.get("da98c875-a775-45e3-a629-3d5e171e3720") == undefined) {
            const progression = {
                id: "da98c875-a775-45e3-a629-3d5e171e3720",
                type: EProgression_Type.quest,
                active_Task: 0,
                defeated: 0,
            };
            this.set(progression);
        }
        if (this.get("047440b0-1c96-48e7-9185-0a3c69535629") == undefined) {
            const progression = {
                id: "047440b0-1c96-48e7-9185-0a3c69535629",
                type: EProgression_Type.quest,
                active_Task: 0,
                defeated: 0,
            };
            this.set(progression);
        }
        if (this.get("7973dae5-1fd9-4a79-95e6-270191816979") == undefined) {
            const progression = {
                id: "7973dae5-1fd9-4a79-95e6-270191816979",
                type: EProgression_Type.quest,
                active_Task: 0,
                defeated: 0,
            };
            this.set(progression);
        }
        if (this.get("dc572846-b8ec-4089-8038-b363975b9c7e") == undefined) {
            const progression = {
                id: "dc572846-b8ec-4089-8038-b363975b9c7e",
                type: EProgression_Type.cinematic,
                shown_Cinematics: [],
            };
            this.set(progression);
        }
    }
}
