import UIKit
import Flutter
import OpenTok
//  Created by Mohammad Aljammal & Elham Rababah on 24/06/20.
//  Copyright © 2020 Cloud. All rights reserved.

@main
@objc class AppDelegate: FlutterAppDelegate ,ICallProtocol {
   
    var result: FlutterResult?
    
    
    func sessionDone(res:Any) {
        self.result?(res)
        
    }
    func sessionNotResponded(res:Any) {
        self.result?(res)
    }
    
  override func application(
    _ application: UIApplication,
    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
  ) -> Bool {
    
        GeneratedPluginRegistrant.register(with: self)
    return super.application(application, didFinishLaunchingWithOptions: launchOptions)
  }
    

    
    
    private func openVideoChat(result: FlutterResult,kApiKey: String, kSessionId: String,kToken: String,appLang:String, vC_ID: Int,tokenID:String,generalId:String,doctorId:Int,baseUrl:String) {
           
//                let storyboard = UIStoryboard(name: "Main", bundle: nil)
//                           let identifier = "ViewControllerNav"
//                           let navVC = storyboard.instantiateViewController(withIdentifier: identifier) as! UINavigationController
//                           let videoVC = navVC.viewControllers.first as! VideoCallViewController
//                           videoVC.kApiKey=kApiKey
//                           videoVC.kSessionId=kSessionId
//                           videoVC.kToken=kToken
//                           videoVC.VC_ID = vC_ID
//                           videoVC.generalid = generalId
//                           videoVC.TokenID = tokenID
//                           videoVC.DoctorId = doctorId
//                           videoVC.baseUrl = baseUrl
//                           videoVC.callBack = self
//                           videoVC.navigationController?.setNavigationBarHidden(true, animated: false)
//                           navVC.modalPresentationStyle = .fullScreen
//                           window.rootViewController?.present(navVC, animated: true, completion: nil)
           
          }
}

