//
/* NOTICE: All information contained herein is, and remains the property of Brightinsight Inc. or its customer. 
 The intellectual and technical concepts contained herein are proprietary to Brightinsight Inc. or its customer and may be covered by U.S. and Foreign Patents, patents in process, and are protected by trade secret or copyright law.
 Dissemination of this information or reproduction of this material is strictly forbidden unless prior written permission is obtained from Brightinsight Inc. or its customer. Access to the source code contained herein is hereby forbidden to anyone except current Brightinsight Inc. employees, managers or contractors who have executed
 Confidentiality and Non-disclosure agreements explicitly covering such access.
 */
/**
 * System Name : BISDKCore
 * Component ID : BIApplication
 * Description :
 * Author: Walter José Pinto
 * Copyright © : Brightinsight, Inc.
 * -----------------------
 * Revision Change
 * -----------------------
 * Author            Date             Version       Change-Description
 *========================================================================================================
 */

import Foundation


/// Helper to prepare resources for BIContext to initialize the SDK.
public class BISDKInitializationHelper {
    
    /// Current `BISDKCore` instance
    let bisdk = BISDKCore()
    
    /**
     * Load modules into the current SDK instance.
     *
     * - Parameters:
     *      - modules: All modules that this SDK instance will have available.
     *
     * - Returns: A reference to self `BISDKInitializationHelper`.
     */
    public func loadModules(_ modules: BISDKModule ...) -> BISDKInitializationHelper {
        bisdk.loadModules(modules)
        return self
    }
    
    /**
     * Load a list of modules into the current SDK instance.
     *
     * - Parameters:
     *      - modules: A list of modules that this SDK instance will have available.
     *
     * - Returns: A reference to self `BISDKInitializationHelper`.
     */
    public func loadModules(_ modules: [BISDKModule]) -> BISDKInitializationHelper {
        bisdk.loadModules(modules)
        return self
    }
    
    /**
     * Start config values for current SDK instance
     *
     * - Parameters:
     *      - biConfig: A `BIConfig`object holding configuration of the current `BIApplication`.
     *
     * - Returns: A reference to self `BISDKInitializationHelper`.
     */
    public func startConfig(_ biConfig: BISDKConfig) -> BISDKInitializationHelper {
        bisdk.setConfig(biConfig)
        return self
    }
}
