import { Component,CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { IonHeader, IonToolbar, IonTitle, IonContent } from '@ionic/angular/standalone';
import { ExploreContainerComponent } from '../explore-container/explore-container.component';
import { IonButton, IonCard, IonCardContent, IonCardHeader, IonCardTitle, IonItem, IonLabel,
   IonList,IonSelect, IonSelectOption } from '@ionic/angular/standalone';
import { CommonModule } from '@angular/common';
import { Router } from '@angular/router';

@Component({
  selector: 'app-tab2',
  templateUrl: 'tab2.page.html',
  styleUrls: ['tab2.page.scss'],
  standalone: true,
  imports: [IonHeader, IonToolbar, IonTitle, IonContent, ExploreContainerComponent,
    IonCard,IonCardHeader,IonCardTitle,IonCardContent,
    IonItem,IonLabel,
    IonSelect,IonSelectOption,
    IonButton,IonList,
    CommonModule
  ],
  schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
export class Tab2Page {

  constructor(private router: Router) {
    // 其他构造函数代码
  }
  consultants = [
    {
      name: '智能心理陪聊师',
      avatar: '/assets/img/2.png',
      fields: ['专业领域：焦虑']
    },
    {
      name: '智能心理陪聊师',
      avatar: '/assets/img/4.png',
      fields: ['专业领域：抑郁']
    },
    {
      name: '智能心理陪聊师',
      avatar: '/assets/img/5.png',
      fields: ['专业领域：压力']
    }
  ];
  
  clickToConsult() {
    // 开始咨询
    //this.router.navigate(['tabs/page-consult'])
    this.router.navigateByUrl("/chat/session/role/2DXJkRsjXK")
  }

  //selectedIssue:string='';
  matchedCounselor: { name: string; specialty: string } | null = null;

  questions = [
    {
      title: '如何应对焦虑？',
      advice: '尝试深呼吸和正念冥想，保持规律的作息，健康饮食，设定小目标，培养兴趣爱好，适当锻炼。',
      expanded: false,
    },
    {
      title: '如何提高自信心？',
      advice: '设定小目标并逐步实现，进行积极自我对话，培养技能，保持健康的生活方式，多与他人社交。',
      expanded: false,
    },
    {
      title: '如何改善人际关系？',
      advice: '积极多与他人沟通，倾听对方的感受，理解他人的感受，多参加社交活动，保持积极的态度，尊重他人。',
      expanded: false,
    },
  ];

  matchCounselor() {
  }
  goChat(){
      this.router.navigateByUrl("/chat/session/role/2DXJkRsjXK")
  }
}