import { Component } from '@angular/core';
import { ActionSheetController } from '@ionic/angular';
import native_plugin from './Native';

@Component({
  selector: 'app-root',
  templateUrl: 'app.component.html',
  styleUrls: ['app.component.scss'],
})
export class AppComponent {
  constructor(public actionSheetController: ActionSheetController) {}

  async presentActionSheet() {
    const actionSheet = await this.actionSheetController.create({
      buttons: [
        //FEATURES
      ],
    });
    await actionSheet.present();

    const { role } = await actionSheet.onDidDismiss();
    console.log('onDidDismiss resolved with role', role);
  }


  async openContactCenter() {
    let result = await native_plugin.openContactCenter();
    console.log(result);
  }

  async openChat() {
    let result = await native_plugin.openChat();
    console.log(result);
  }

  async openCall() {
    let result = await native_plugin.openCall();
    console.log(result);
  }

  async openStreaming() {
    let result = await native_plugin.openStreaming();
    console.log(result);
  }

  async openSettings() {
    await native_plugin.openSettings();
  }

  async openProfile() {
    await native_plugin.openProfile();
  }

  async openWhiteboard() {
    let result = await native_plugin.openWhiteboard();
    console.log(result);
  }

  async openChatGPT() {
    let result = await native_plugin.openChatGPT();
    console.log(result);
  }

  async openContactCenterChat() {
    let result = await native_plugin.openContactCenterChat({category:0});
    console.log(result);
  }

  async openContactCenterAudioCall() {
    let result = await native_plugin.openContactCenterAudioCall({category:0});
    console.log(result);
  }

  async openContactCenterVideoCall() {
    let result = await native_plugin.openContactCenterVideoCall({category:0});
    console.log(result);
  }

  async adminSignIn() {
    let result = await native_plugin.adminSignIn({pwd:"abcd1234"});
    console.log(result);
  }

  async openSetOfficer() {
    let result = await native_plugin.openSetOfficer();
    console.log(result);
  }

}
