import { Component } from '@angular/core';
import { ModalController } from '@ionic/angular';
import { TaskModalComponent } from '../shared/task-modal/task-modal.component';
import { DataService } from '../services/data.service';
import { TaskCardComponent } from '../shared/task-card/task-card.component';
import { IonHeader, IonToolbar, IonTitle, IonContent, IonFab, IonFabButton, IonIcon,IonButton,IonButtons } from '@ionic/angular/standalone';

@Component({
  selector: 'app-tab1',
  templateUrl: './tab1.page.html',
  styleUrls: ['./tab1.page.scss'],
  standalone: true,
  imports: [IonHeader, IonToolbar, IonTitle, IonContent, IonFab, IonFabButton, IonIcon, TaskCardComponent, IonButtons, IonButton]
})
export class Tab1Page {
  currentDate: string;

  constructor(private dataService: DataService,private modalCtrl: ModalController) {this.currentDate = new Date().toLocaleDateString();}

  async openTaskModal() {
    const modal = await this.modalCtrl.create({
      component: TaskModalComponent
    });
    return await modal.present();
  }


}
