package com.bluebillywig.channelsdk import com.facebook.react.bridge.ReactApplicationContext import com.facebook.react.bridge.ReactMethod import com.facebook.react.bridge.Promise import com.facebook.react.module.annotations.ReactModule /** * Native module for Blue Billywig Channel SDK * * Supports both old and new React Native architectures. */ @ReactModule(name = BBChannelModule.NAME) class BBChannelModule(reactContext: ReactApplicationContext) : NativeBBChannelModuleSpec(reactContext) { companion object { const val NAME = "BBChannelModule" } override fun getName(): String = NAME /** * Get SDK version */ @ReactMethod override fun getVersion(promise: Promise) { promise.resolve("1.0.0") } /** * Check if the SDK is properly initialized */ @ReactMethod override fun isInitialized(promise: Promise) { promise.resolve(true) } /** * Prefetch channel data for faster loading */ @ReactMethod override fun prefetchChannel(channelUrl: String, promise: Promise) { // Implementation would cache channel JSON promise.resolve(true) } /** * Clear cached data */ @ReactMethod override fun clearCache(promise: Promise) { // Implementation would clear any cached data promise.resolve(true) } }