{"size": 668, "ext": "js", "max_stars_repo_path": "ai.js", "max_stars_repo_name": "abolfazliszh/ai.js", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "ai.js", "max_issues_repo_name": "abolfazliszh/ai.js", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "ai.js", "max_forks_repo_name": "abolfazliszh/ai.js", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 19.6470588235, "max_line_length": 71, "alphanum_fraction": 0.5449101796}
import AppService from "./services/AppService.js";
import RouterService from "./services/RouterService.js";

class Ai {
    init() {
        /**
         * @type HtmlElement element
         */
        let element = document.getElementById('aijs');

        if (!element) {
            console.error('Aijs main element not found.');
            return;
        }

        let appService = new AppService();

        let component = (new RouterService(appService)).getComponent();

        if (!component) {
            return;
        }

        element.innerHTML = component.template();

        component.init();
    }
}

/**
 * Init the AiJS
 */
(new Ai()).init();
