import PagesControl from "../utils/PagesControl.js";
import auth from "./Auth.js";
import {languagesChanges, themeColor, themeMode} from "../utils/AdminConfigure.js";
import users from "./Users.js";
import {vectorMapAdmin} from "../utils/VectorMap.js";
import settings from "./Settings.js";
import references from "./References.js";

languagesChanges()

if (PagesControl("/admin/login")) {
    auth()
} else {
    themeMode()
    themeColor()
    if (PagesControl("/admin/users")) {
        users(true)
    }
    if (PagesControl("/admin/profile",false)) {
        users(false)
    }
    if (PagesControl("/admin") || PagesControl("/admin/") || PagesControl("/admin/index") ) {
        vectorMapAdmin()
    }
    if (PagesControl("/admin/settings")) {
        settings()
    }
    if (PagesControl("/admin/references")) {
        references()
    }
}
