import DataUtils, { REQUEST_TYPE_GET, REQUEST_TYPE_PUT, REQUEST_TYPE_POST, REQUEST_TYPE_DELETE, CONTENT_TYPE_JSON, CONTENT_TYPE_FORM } from './tools/utilities/DataUtils.jsx';
import * as DataEvent from './tools/events/DataEvent.jsx';
import DisplayManager from './controllers/DisplayManager.jsx';

class Base {
    //--------------------------
    // constructor
    //--------------------------
    
    //TODO: Flip to unified structure defined in BMG, brah
    constructor() {
        var self = this;
        var admin = [];
        var folio = [];
        var displayManager = [];
        this.dataUtils = new DataUtils();
        this.settings = [];
        this.start();        
    }
    start() {
        this.displayManager = new DisplayManager();
    }
    //--------------------------
    // methods
    //--------------------------
    loadSettings() {
        var self = this;
        this.dataUtils.request('/base-assets/data/settings.json', DataEvent.SETTINGS_LOADED)
            .then((response) => {
                this.settings = JSON.parse(response['request'].response);
                this.start();
                //transfer 
                
            })
            .catch((err) => {
                //console.log(err);
            });
    }

    //--------------------------
    // event handlers
    //--------------------------

}
export { Base as default }
