"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const NativeCommandsSender_1 = require("./adapters/NativeCommandsSender"); const NativeEventsReceiver_1 = require("./adapters/NativeEventsReceiver"); const Commands_1 = require("./commands/Commands"); const EventsRegistry_1 = require("./events/EventsRegistry"); const EventsRegistryIOS_1 = require("./events/EventsRegistryIOS"); const UniqueIdProvider_1 = require("./adapters/UniqueIdProvider"); const CompletionCallbackWrapper_1 = require("./adapters/CompletionCallbackWrapper"); const NotificationsIOS_1 = require("./NotificationsIOS"); const NotificationsAndroid_1 = require("./NotificationsAndroid"); class NotificationsRoot { constructor() { this.nativeEventsReceiver = new NativeEventsReceiver_1.NativeEventsReceiver(); this.nativeCommandsSender = new NativeCommandsSender_1.NativeCommandsSender(); this.completionCallbackWrapper = new CompletionCallbackWrapper_1.CompletionCallbackWrapper(this.nativeCommandsSender); this.uniqueIdProvider = new UniqueIdProvider_1.UniqueIdProvider(); this.commands = new Commands_1.Commands(this.nativeCommandsSender, this.uniqueIdProvider); this.eventsRegistry = new EventsRegistry_1.EventsRegistry(this.nativeEventsReceiver, this.completionCallbackWrapper); this.eventsRegistryIOS = new EventsRegistryIOS_1.EventsRegistryIOS(this.nativeEventsReceiver); this.ios = new NotificationsIOS_1.NotificationsIOS(this.commands, this.eventsRegistryIOS); this.android = new NotificationsAndroid_1.NotificationsAndroid(this.commands); } /** * registerRemoteNotifications */ registerRemoteNotifications() { this.ios.registerRemoteNotifications(); this.android.registerRemoteNotifications(); } /** * postLocalNotification */ postLocalNotification(notification, id) { return this.commands.postLocalNotification(notification, id); } /** * getInitialNotification */ getInitialNotification() { return this.commands.getInitialNotification(); } /** * setCategories */ setCategories(categories) { this.commands.setCategories(categories); } /** * cancelLocalNotification */ cancelLocalNotification(notificationId) { return this.commands.cancelLocalNotification(notificationId); } /** * isRegisteredForRemoteNotifications */ isRegisteredForRemoteNotifications() { return this.commands.isRegisteredForRemoteNotifications(); } /** * Obtain the events registry instance */ events() { return this.eventsRegistry; } } exports.NotificationsRoot = NotificationsRoot;