import BackgroundApplication from "./application/BackgroundApplication";
import AifexServiceHTTP from "./_infra/AifexServiceHTTP";
import HandlerOfMessageSentByPopup from "./_ui/HandlerOfMessageSentByPopup";
import ChromeTabScriptService from "./_infra/ChromeTabScriptService";
import HandlerOfMessageSentByTabScript from "./_ui/HandlerOfMessageSentByTabScript";
import FirefoxExtensionCommunicationService from "./_infra/FirefoxExtensionCommunicationService";
import FirefoxBrowserService from "./_infra/FirefoxBrowserService";

const browserService = new FirefoxBrowserService();
const aifexService = new AifexServiceHTTP();
const tabScriptService = new ChromeTabScriptService();
const application = new BackgroundApplication(browserService, aifexService, tabScriptService);
//const chromeMessageHandler = new ChromeMessageHandler(application);
//chromeMessageHandler.attach();

const firefoxExtensionCommunicationService = new FirefoxExtensionCommunicationService();
const handlerOfMessageSentByPopup = new HandlerOfMessageSentByPopup(application, firefoxExtensionCommunicationService);
const handlerOfMessageSentTabScript = new HandlerOfMessageSentByTabScript(application, firefoxExtensionCommunicationService);