//
//  SpeakTipssssssViewCell.swift
//  SpeakEasyLearnEnglish
//
//  Created by edy on 2025/8/18.
//

import UIKit

class SpeakTipssssssViewCell: UICollectionViewCell {

    static let id = "SpeakTipssssssViewCell"
    
    var data:SpeakTipssssssMode? {
        didSet{
            SpeakTip.text = data?.work
            self.SpeakTipTran.text = " "
            DispatchQueue.main.asyncAfter(deadline: .now() + 5) {
                self.SpeakTipTran.text = self.data?.translation ?? " "
            }
            
        }
    }
    
    @IBOutlet weak var SpeakTip: UILabel!
    @IBOutlet weak var SpeakTipTran: SpeakLoadingLabel!
    
    override func awakeFromNib() {
        super.awakeFromNib()
    }

    @IBAction func SpeakVoice(_ sender: Any) {
        SpeakSpeechSynthesizer.share.speakText(data?.work ?? "")
    }
}
