import BackgroundApplication from "./application/BackgroundApplication";
import AifexServiceHTTP from "./_infra/AifexServiceHTTP";
import ChromeBrowserService from "./_infra/ChromeBrowserService";
import HandlerOfMessageSentByPopup from "./_ui/HandlerOfMessageSentByPopup";
import ChromeTabScriptService from "./_infra/ChromeTabScriptService";
import HandlerOfMessageSentByTabScript from "./_ui/HandlerOfMessageSentByTabScript";
import ChromeExtensionCommunicationService from "./_infra/ChromeExtensionCommunicationService";

const browserService = new ChromeBrowserService();
const aifexService = new AifexServiceHTTP();
const tabScriptService = new ChromeTabScriptService();
const application = new BackgroundApplication(browserService, aifexService, tabScriptService);

const chromeExtensionCommunicationService = new ChromeExtensionCommunicationService();
const handlerOfMessageSentByPopup = new HandlerOfMessageSentByPopup(application, chromeExtensionCommunicationService);
const handlerOfMessageSentTabScript = new HandlerOfMessageSentByTabScript(application, chromeExtensionCommunicationService);