"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.IOSNotification = void 0;
const events_1 = require("events");
const constants_1 = require("../../common/constants");
const yok_1 = require("../../common/yok");
class IOSNotification extends events_1.EventEmitter {
    getAttachRequest(appId, deviceId) {
        this.emit(constants_1.ATTACH_REQUEST_EVENT_NAME, { deviceId, appId });
        return this.formatNotification(IOSNotification.ATTACH_REQUEST_NOTIFICATION_NAME, appId);
    }
    getReadyForAttach(appId) {
        return this.formatNotification(IOSNotification.READY_FOR_ATTACH_NOTIFICATION_NAME, appId);
    }
    getRefreshRequest(appId) {
        return this.formatNotification(IOSNotification.REFRESH_REQUEST_NOTIFICATION_NAME, appId);
    }
    getAppRefreshStarted(appId) {
        return this.formatNotification(IOSNotification.APP_REFRESH_STARTED_NOTIFICATION_NAME, appId);
    }
    formatNotification(notification, appId) {
        return `${appId}:NativeScript.Debug.${notification}`;
    }
}
IOSNotification.REFRESH_REQUEST_NOTIFICATION_NAME = "RefreshRequest";
IOSNotification.APP_REFRESH_STARTED_NOTIFICATION_NAME = "AppRefreshStarted";
IOSNotification.ATTACH_REQUEST_NOTIFICATION_NAME = "AttachRequest";
IOSNotification.READY_FOR_ATTACH_NOTIFICATION_NAME = "ReadyForAttach";
exports.IOSNotification = IOSNotification;
yok_1.injector.register("iOSNotification", IOSNotification);
