//
//  AlertDB.swift
//  Sailassist
//
//  Created by 三浦薫巳 on 2023/11/19.
//

import Foundation

struct WarnRecord {
    var title: String
    var body: String
}

enum SwitchingEca {
    case Finish
    case Start
    case Notice

    init() {
        self = .Notice
    }
}

class AlertDB {
    // シングルトン宣言
    static let OnlyOne = AlertDB()

    private var alertEca : [SwitchingEca: WarnRecord] = [
        SwitchingEca.Finish: WarnRecord(title: NSLocalizedString("No Fuel Switching Finished", comment: ""), body: NSLocalizedString("Arrived at switching finished point.", comment: ""))
        , SwitchingEca.Start: WarnRecord(title: NSLocalizedString("Eca Start", comment: ""), body: NSLocalizedString("Arrived at switching start point.", comment: ""))
        , SwitchingEca.Notice: WarnRecord(title: NSLocalizedString("Eca Notice", comment: ""), body: NSLocalizedString("Arrived at advance notice point.", comment: ""))
    ]

    //Eca通知
    func GetAlertEcaPoint(point : SwitchingEca) -> WarnRecord {
        return alertEca[point]!
    }
}
