import { Component } from '@angular/core';

@Component({
  selector: 'app-tab4',
  templateUrl: 'tab4.page.html',
  styleUrls: ['tab4.page.scss'],
})
export class Tab4Page {
  unreadMessages = 3; // Example value, update with actual unread messages count
  selectedTab = 'message';

  messages = [
    { avatar: 'assets/image4.jpg', title: '交易物流', content: '您购买的宝贝已签收', time: '星期二' },
    { avatar: 'avatar_url_2', title: 'Message 2', content: 'Content of message 2', time: '11:30 AM' },
    { avatar: 'avatar_url_2', title: 'Message 3', content: 'Content of message 3', time: '11:30 AM' },
    { avatar: 'avatar_url_2', title: 'Message 4', content: 'Content of message 4', time: '11:30 AM' },
    { avatar: 'avatar_url_2', title: 'Message 5', content: 'Content of message 5', time: '11:30 AM' },
    // Add more messages as needed
  ];

  constructor() {}

  search() {
    // Implement search functionality
  }

  addNewMessage() {
    // Implement adding new message functionality
  }

  selectTab(tab: string) {
    this.selectedTab = tab;
  }
}