import { Component, OnInit } from '@angular/core';
import { CloudUser } from 'src/lib/ncloud';

@Component({
  selector: 'app-page-mine',
  templateUrl: './page-mine.component.html',
  styleUrls: ['./page-mine.component.scss'],
  standalone: true,
})
export class PageMineComponent  implements OnInit {

  currentUser:CloudUser|undefined
  constructor() { 
    this.currentUser=new CloudUser()
  }
  async login(){
    let user=await this.currentUser?.login("Clym","1234")
    if(user?.id){
      this.currentUser=user
    }
  }
  async logout(){
    this.currentUser?.logout();
    this.currentUser=undefined
  }

  ngOnInit() {}

}
