import { Component, OnInit } from '@angular/core';
import { CommonCompModule } from '../../../services/common.modules';
import { Router } from '@angular/router';
import * as Parse from 'parse';
import { NzTabsModule } from 'ng-zorro-antd/tabs';
import { PageTextbookComponent } from '../components/page-textbook/page-textbook.component';
import { textbookServer } from '../../../services/textbook';
import { TextbookComponent } from '../../../app/textbook/textbook.component';
@Component({
  selector: 'app-space',
  standalone: true,
  imports: [
    CommonCompModule,
    NzTabsModule,
    PageTextbookComponent,
    TextbookComponent,
  ],
  templateUrl: './space.component.html',
  styleUrls: ['./space.component.scss'],
})
export class SpaceComponent implements OnInit {
  user: Parse.Object | any = Parse.User.current();
  active: number = 0;
  myTextBook:any = {
    isCheck:true,
    status:['101','102','300'],
    btns:{
      edit:true,//编辑
      isDelete:true, //删除权限
      submit:true //提交
    }
  }
  submitTextBook = {
    status:['200','201','400'],
    btns:{
      review:true,//编辑
    }
  }
  constructor(private router: Router, public tbookSer: textbookServer) {}

  ngOnInit() {}

  goUrl(url: string, params?: object | any) {
    console.log(url);
    if (params) {
      this.router.navigate([url, params]);
    } else {
      this.router.navigate([url]);
    }
  }
}
