import { NativeModules } from 'react-native';
import logger from './Utils/Logger';

const { BluestackManager } = NativeModules;

export const BluestackSDK = {
    /**
     * Load interstitial ad for a given placementId and shows it
     */
    initialize(appId: string, enableDebug: boolean = false): Promise<number> {
        if (enableDebug) {
            logger.setDebug(enableDebug);
        }

        logger.log(`Initilizing Bluestack SDK with appId: ${appId}`);
        return BluestackManager.initializeSDK(appId, enableDebug);
    },
};
