//
//  SetNgaArea.swift
//  Sailassist
//
//  Created by 三浦薫巳 on 2024/06/14.
//

import Foundation
import SwiftUI

class SetNgaArea {
    @ObservedObject var ngaData = SharingData.nga
    var sessionNgaList = SessionNgaList()

    func start(nga : ReqNgaList) {
        print(debug: "called")
        sessionNgaList.RequestPostNgaList(nga, completion: responsePostNgaList)
    }

    private func responsePostNgaList(result: Result<Data, APIError>) {
        print(debug: "called")
        switch result {
        case .success(let errorCode):
            print(debug: "success: \(errorCode)")
        case .failure(let errorCode):
            print(debug: "failure: \(errorCode)")
            break
        }
    }
}
