import { CommonModule } from '@angular/common';
import { Component, OnInit } from '@angular/core';
import { EditRatingStarComponent } from '../component/edit-rating-star/edit-rating-star.component';
import { EditTagComponent } from '../component/edit-tag/edit-tag.component';
import { IonButton, IonItem, IonLabel, IonList, IonSelect, IonSelectOption, IonTextarea } from '@ionic/angular/standalone';

@Component({
  selector: 'app-page-test',
  templateUrl: './page-test.component.html',
  styleUrls: ['./page-test.component.scss'],
  standalone: true,
  imports: [
    CommonModule,EditTagComponent,EditRatingStarComponent,IonItem,IonTextarea,IonList,
    IonSelect,IonSelectOption,IonLabel,IonButton
  ]
})
export class PageTestComponent  implements OnInit {

  constructor() { }

    /**
   * 星星打分
   */
    currentScore:number = 0; // 初始分值

    handleScoreChange(newScore: number) {
      this.currentScore = newScore;
      console.log('新分值:', newScore); // 处理分值变化
    }
  
    /**
     * 标签编辑
     */
    editTags:Array<string> = []
    setTagValue(ev:any){
      console.log("setTagValue：",ev)
      this.editTags = ev
    }
    
    symptomDesc:string = ""
    /**
     * 记录病情
     */
    analyseSymptom(){
      console.log("记录病情")
      console.log("symptomDesc：",this.symptomDesc)
      this.symptomDesc = ""
    }
    
    /**
     * 得到输入框内容
     * @param ev 输入框内容
     */
    onInput(ev:any) {
      this.symptomDesc = ev.detail.value;
    }

  ngOnInit() {}

}
