// Path: src/main/java/craftedcart/smblevelworkshop/project/ProjectManager.java
// public class ProjectManager {
// 
//     private static Project currentProject;
// 
//     public static void setCurrentProject(Project currentProject) {
//         ProjectManager.currentProject = currentProject;
//     }
// 
//     public static Project getCurrentProject() {
//         return currentProject;
//     }
// 
//     public static LevelData getCurrentLevelData() {
//         return getCurrentProject().clientLevelData.getLevelData();
//     }
// 
//     public static ClientLevelData getCurrentClientLevelData() {
//         return getCurrentProject().clientLevelData;
//     }
// 
// }
// 
// Path: src/main/java/craftedcart/smblevelworkshop/resource/LangManager.java
// public class LangManager {
// 
//     //                         <Locale,    <Key   , Value >>
//     @NotNull private static Map<String, Map<String, String>> localeMap = new HashMap<>();
//     @NotNull private static String selectedLang = "en_US";
// 
//     /**
//      * Add an item given a locale, key and value
//      *
//      * @param locale The language locale (eg: en_US)
//      * @param key The identifier
//      * @param value The translated string
//      */
//     public static void addItem(String locale, String key, String value) {
//         if (localeMap.containsKey(locale)) {
//             Map<String, String> langMap = localeMap.get(locale);
//             langMap.put(key, value);
//             localeMap.put(locale, langMap);
//         } else {
//             Map<String, String> langMap = new HashMap<>();
//             langMap.put(key, value);
//             localeMap.put(locale, langMap);
//         }
//     }
// 
//     /**
//      * Get a translated string, given a locale and key
//      *
//      * @param locale The language locale (eg: en_US)
//      * @param key The identifier
//      * @return The translated string, or the key if the entry wasn't found
//      */
//     public static String getItem(String locale, String key) {
//         if (localeMap.containsKey(locale)) {
//             if (localeMap.get(locale).containsKey(key)) {
//                 return localeMap.get(locale).get(key);
//             } else {
//                 return key;
//             }
//         } else {
//             return key;
//         }
//     }
// 
//     public static String getItem(String key) {
//         return getItem(selectedLang, key);
//     }
// 
//     public static void setSelectedLang(@NotNull String selectedLang) {
//         LangManager.selectedLang = selectedLang;
//     }
// 
//     @NotNull
//     public static String getSelectedLang() {
//         return selectedLang;
//     }
// 
// }


import craftedcart.smblevelworkshop.project.ProjectManager;
import craftedcart.smblevelworkshop.resource.LangManager;
import io.github.craftedcart.fluidui.FluidUIScreen;
import io.github.craftedcart.fluidui.FontCache;
import io.github.craftedcart.fluidui.component.*;
import io.github.craftedcart.fluidui.plugin.PluginSmoothAnimateAnchor;
import io.github.craftedcart.fluidui.plugin.PluginSmoothAnimatePanelBackgroundColor;
import io.github.craftedcart.fluidui.uiaction.UIAction;
import io.github.craftedcart.fluidui.util.UIColor;
import java.io.File;
        final ListBox listBox = new ListBox();
        listBox.setOnInitAction(() -> {
            listBox.setTopLeftPos(24, 72);
            listBox.setBottomRightPos(-24, -72);
            listBox.setTopLeftAnchor(0, 0);
            listBox.setBottomRightAnchor(1, 1);
        });
        mainPanel.addChildComponent("listBox", listBox);

        populateListBox(listBox);

        final TextButton okButton = new TextButton();
        okButton.setOnInitAction(() -> {
            okButton.setTopLeftPos(-152, -48);
            okButton.setBottomRightPos(-24, -24);
            okButton.setTopLeftAnchor(1, 1);
            okButton.setBottomRightAnchor(1, 1);
            okButton.setText(LangManager.getItem("ok"));
        });
        okButton.setOnLMBAction(() -> {
            assert parentComponent instanceof FluidUIScreen;
            ((FluidUIScreen) parentComponent).setOverlayUiScreen(null); //Hide on OK
        });
        mainPanel.addChildComponent("okButton", okButton);

    }

    private void populateListBox(ListBox listBox) {
        //Model sources
        listBox.addChildComponent("modelSourcesLabel", getLabel(LangManager.getItem("modelSources")));
// Path: src/main/java/craftedcart/smblevelworkshop/project/ProjectManager.java
// public class ProjectManager {
// 
//     private static Project currentProject;
// 
//     public static void setCurrentProject(Project currentProject) {
//         ProjectManager.currentProject = currentProject;
//     }
// 
//     public static Project getCurrentProject() {
//         return currentProject;
//     }
// 
//     public static LevelData getCurrentLevelData() {
//         return getCurrentProject().clientLevelData.getLevelData();
//     }
// 
//     public static ClientLevelData getCurrentClientLevelData() {
//         return getCurrentProject().clientLevelData;
//     }
// 
// }
// 
// Path: src/main/java/craftedcart/smblevelworkshop/resource/LangManager.java
// public class LangManager {
// 
//     //                         <Locale,    <Key   , Value >>
//     @NotNull private static Map<String, Map<String, String>> localeMap = new HashMap<>();
//     @NotNull private static String selectedLang = "en_US";
// 
//     /**
//      * Add an item given a locale, key and value
//      *
//      * @param locale The language locale (eg: en_US)
//      * @param key The identifier
//      * @param value The translated string
//      */
//     public static void addItem(String locale, String key, String value) {
//         if (localeMap.containsKey(locale)) {
//             Map<String, String> langMap = localeMap.get(locale);
//             langMap.put(key, value);
//             localeMap.put(locale, langMap);
//         } else {
//             Map<String, String> langMap = new HashMap<>();
//             langMap.put(key, value);
//             localeMap.put(locale, langMap);
//         }
//     }
// 
//     /**
//      * Get a translated string, given a locale and key
//      *
//      * @param locale The language locale (eg: en_US)
//      * @param key The identifier
//      * @return The translated string, or the key if the entry wasn't found
//      */
//     public static String getItem(String locale, String key) {
//         if (localeMap.containsKey(locale)) {
//             if (localeMap.get(locale).containsKey(key)) {
//                 return localeMap.get(locale).get(key);
//             } else {
//                 return key;
//             }
//         } else {
//             return key;
//         }
//     }
// 
//     public static String getItem(String key) {
//         return getItem(selectedLang, key);
//     }
// 
//     public static void setSelectedLang(@NotNull String selectedLang) {
//         LangManager.selectedLang = selectedLang;
//     }
// 
//     @NotNull
//     public static String getSelectedLang() {
//         return selectedLang;
//     }
// 
// }


// Path: src/main/java/craftedcart/smblevelworkshop/ui/ProjectSettingsOverlayUIScreen.java
import craftedcart.smblevelworkshop.project.ProjectManager;
import craftedcart.smblevelworkshop.resource.LangManager;
import io.github.craftedcart.fluidui.FluidUIScreen;
import io.github.craftedcart.fluidui.FontCache;
import io.github.craftedcart.fluidui.component.*;
import io.github.craftedcart.fluidui.plugin.PluginSmoothAnimateAnchor;
import io.github.craftedcart.fluidui.plugin.PluginSmoothAnimatePanelBackgroundColor;
import io.github.craftedcart.fluidui.uiaction.UIAction;
import io.github.craftedcart.fluidui.util.UIColor;
import java.io.File;

        final ListBox listBox = new ListBox();
        listBox.setOnInitAction(() -> {
            listBox.setTopLeftPos(24, 72);
            listBox.setBottomRightPos(-24, -72);
            listBox.setTopLeftAnchor(0, 0);
            listBox.setBottomRightAnchor(1, 1);
        });
        mainPanel.addChildComponent("listBox", listBox);

        populateListBox(listBox);

        final TextButton okButton = new TextButton();
        okButton.setOnInitAction(() -> {
            okButton.setTopLeftPos(-152, -48);
            okButton.setBottomRightPos(-24, -24);
            okButton.setTopLeftAnchor(1, 1);
            okButton.setBottomRightAnchor(1, 1);
            okButton.setText(LangManager.getItem("ok"));
        });
        okButton.setOnLMBAction(() -> {
            assert parentComponent instanceof FluidUIScreen;
            ((FluidUIScreen) parentComponent).setOverlayUiScreen(null); //Hide on OK
        });
        mainPanel.addChildComponent("okButton", okButton);

    }

    private void populateListBox(ListBox listBox) {
        //Model sources
        listBox.addChildComponent("modelSourcesLabel", getLabel(LangManager.getItem("modelSources")));
        for (File file : ProjectManager.getCurrentLevelData().getModelObjSources()) {