// stubs to avoid bundler warnings
export const updateContentDescription = (view /* View */, forceUpdate) => null;
export function applyContentDescription(view /* View */, forceUpdate) {
    return null;
}
export const androidRegisteredReceivers = undefined;
export const androidPendingReceiverRegistrations = undefined;
export function androidRegisterBroadcastReceiver(intentFilter, onReceiveCallback, flags = 2) { }
export function androidUnregisterBroadcastReceiver(intentFilter) { }
export function androidGetCurrentActivity() { }
export function androidGetForegroundActivity() { }
export function androidSetForegroundActivity(activity) { }
export function androidGetStartActivity() { }
export function androidSetStartActivity(activity) { }
var NotificationObserver = /** @class */ (function (_super) {
    __extends(NotificationObserver, _super);
    function NotificationObserver() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    NotificationObserver.initWithCallback = function (onReceiveCallback) {
        var observer = _super.new.call(this);
        observer._onReceiveCallback = onReceiveCallback;
        return observer;
    };
    NotificationObserver.prototype.onReceive = function (notification) {
        this._onReceiveCallback(notification);
    };
    NotificationObserver.ObjCExposedMethods = {
        onReceive: { returns: interop.types.void, params: [NSNotification] },
    };
    return NotificationObserver;
}(NSObject));
export const iosNotificationObservers = [];
export function iosAddNotificationObserver(notificationName, onReceiveCallback) {
    const observer = NotificationObserver.initWithCallback(onReceiveCallback);
    NSNotificationCenter.defaultCenter.addObserverSelectorNameObject(observer, 'onReceive', notificationName, null);
    iosNotificationObservers.push(observer);
    return observer;
}
export function iosRemoveNotificationObserver(observer, notificationName) {
    // TODO: test if this finds the right observer instance match everytime
    // after circular dependencies are resolved
    const index = iosNotificationObservers.indexOf(observer);
    if (index >= 0) {
        iosNotificationObservers.splice(index, 1);
        NSNotificationCenter.defaultCenter.removeObserverNameObject(observer, notificationName, null);
    }
}
export function setupAccessibleView(view /* any */) {
    const uiView = view.nativeViewProtected;
    if (!uiView) {
        return;
    }
    /**
     * We need to map back from the UIView to the NativeScript View.
     *
     * We do that by setting the uiView's tag to the View's domId.
     * This way we can do reverse lookup.
     */
    uiView.tag = view._domId;
}
//# sourceMappingURL=helpers.ios.js.map