import { Component, OnInit } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { IonHeader, IonToolbar, IonTitle, IonContent,IonButtons, IonButton, IonIcon,IonDatetime } from '@ionic/angular/standalone';
import { Router } from '@angular/router';
import { addIcons } from 'ionicons';
import { calendar } from 'ionicons/icons';
@Component({
  selector: 'app-daily-content',
  templateUrl: './daily-content.page.html',
  styleUrls: ['./daily-content.page.scss'],
  standalone: true,
  imports: [FormsModule,CommonModule,IonHeader, IonToolbar, IonTitle, IonContent,IonButtons, IonButton,IonDatetime, IonIcon],
})
export class DailyContentPage implements OnInit {
  dailyItems = [
    {
      date: '2024-11-30',
      title: '清平调',
      snippet: '云想衣裳花想容，春风拂槛露华浓。若非群玉山头见，会向瑶台月下逢。.',
      image: '../assets/image/01/Vx_03.jpg'
    },
    {
      date: '2024-11-29',
      title: '纯诗歌内容（内带详细注解）',
      snippet: '床前明月光，疑是地上霜...',
      image: ''
    },
    {
      date: '2024-11-28',
      title: '纯诗歌内容（内带详细注解）',
      snippet: '床前明月光，疑是地上霜...',
      image: ''
    },
    {
      date: '2024-11-27',
      title: '纯诗歌内容（内带详细注解）',
      snippet: '床前明月光，疑是地上霜...',
      image: ''
    },
    {
      date: '2024-11-26',
      title: '纯诗歌内容（内带详细注解）',
      snippet: '床前明月光，疑是地上霜...',
      image: ''
    },
    {
      date: '2024-11-25',
      title: '纯诗歌内容（内带详细注解）',
      snippet: '床前明月光，疑是地上霜...',
      image: ''
    },
    // 更多内容...
  ];
  ngOnInit() {
  }
  constructor(private router:Router) {
    addIcons({calendar});
  }
  navigateToDiary() {
    this.router.navigateByUrl('/daily-content')
    // 导航到日历页面的逻辑
  }

  navigateToToday() {
    this.router.navigateByUrl('/tabs/tab1')
    // 返回到今天内容的逻辑
  }

  onDateChange(event: any) {
    // 处理日期改变的逻辑
  }

  viewItemDetails(item: any) {
    console.log(item);
    // 跳转到对应内容详情页面的逻辑
  }
}
