package com.smartechpushreactnative import com.facebook.react.bridge.* class SmartechPushReactNativeModule(reactContext: ReactApplicationContext) : NativeSmartechPushReactNativeSpec(reactContext) { val smartechPushReactNativeImpl = SmartechPushReactNativeImpl(reactContext) override fun getName(): String { return smartechPushReactNativeImpl.getName() } override fun getTypedExportedConstants(): MutableMap { return smartechPushReactNativeImpl.getConstants() } override fun optPushNotification(value: Boolean) { try { smartechPushReactNativeImpl.optPushNotification(value) } catch (e: Throwable) { e.printStackTrace() } } override fun hasOptedPushNotification(callback: Callback?) { smartechPushReactNativeImpl.hasOptedPushNotification(callback) } override fun getDevicePushToken(callback: Callback?) { smartechPushReactNativeImpl.getDevicePushToken(callback) } override fun setDevicePushToken(token: String?) { smartechPushReactNativeImpl.setDevicePushToken(token) } override fun handlePushNotification(notificationData: String, callback: Callback?) { smartechPushReactNativeImpl.handlePushNotification(notificationData, callback) } override fun requestNotificationPermission(callback: Callback?) { smartechPushReactNativeImpl.requestNotificationPermission(callback) } override fun updateNotificationPermission(pnPermissionStatus:Double) { smartechPushReactNativeImpl.updateNotificationPermission(pnPermissionStatus) } override fun registerForPushNotificationWithAuthorizationOptions( alert: Boolean, badge: Boolean, sound: Boolean ) { smartechPushReactNativeImpl.registerForPushNotificationWithAuthorizationOptions( alert, badge, sound ) } override fun addListener(eventName: String) { } override fun removeListeners(count: Double) { } }