import UIKit
import AutoCatCore

class VehicleNoteCell: UITableViewCell {

    @IBOutlet weak var noteText: UILabel!
    @IBOutlet weak var date: UILabel!
    
    private var dateFormatter = DateFormatter()
    
    override func awakeFromNib() {
        super.awakeFromNib()
        self.dateFormatter.dateStyle = .medium
        self.dateFormatter.timeStyle = .medium
    }

    func configure(with note: VehicleNote) {
        self.noteText.text = note.text
        self.date.text = self.dateFormatter.string(from: Date(timeIntervalSince1970: note.date))
    }
}
