//
//  YHBasicInfoFillViewModel.swift
//  galaxy
//
//  Created by davidhuangA on 2024/2/4.
//  Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//

import UIKit

class YHBasicInfoFillViewModel : YHBaseViewModel {
    var arrBasicInfoSessionDataForEdit : [YHBasicInfoSessionModel] = []
}

extension YHBasicInfoFillViewModel {
    func getBasicInfoData() {
        //session1
        
        var arrData : [YHBasicInfoSessionModel] = []
        do {
            //主申请人
            let model1 = YHBasicInfoCellModel(question: "1、是否曾在香港或其他地方因任何罪行或违法行为被定罪？", answer: "N", additionDes: "")
            let model2 = YHBasicInfoCellModel(question: "2、是否曾在香港或其他地方被拒入境／递解／遣送或要求离境？", answer: "Y", additionDes: "")
            let model3 = YHBasicInfoCellModel(question: "3、是否曾被拒绝签发香港或其他地方的签证／进入许可？", answer: "N", additionDes: "")
            let model4 = YHBasicInfoCellModel(question: "4、是否曾触犯香港或任何地方的入境法例？", answer: "", additionDes: "N")
            let model5 = YHBasicInfoCellModel(question: "5、是否曾经使用另一个姓名或身份申请香港入境签证/进入许可或进入香港？", answer: "", additionDes: "")
            let arr = [model1,model2,model3,model4,model5]
            
            let sessionModel = YHBasicInfoSessionModel(sessionTitle: "主申请人", arrQuestionItem: arr)
            arrData.append(sessionModel)
        }
        
        
        
        do {
            //配偶
            let model1 = YHBasicInfoCellModel(question: "1、是否曾被拒绝入境/递解/遣送或要求离开香港?", answer: "", additionDes: "")
            let model2 = YHBasicInfoCellModel(question: "2、是否曾被拒绝签发签证／进入许可以入境香港？", answer: "", additionDes: "")
            let arr = [model1,model2]
            
            let sessionModel = YHBasicInfoSessionModel(sessionTitle: "配偶", arrQuestionItem: arr)
            arrData.append(sessionModel)
        }
        
        
        
        do {
            //子女 - xxx
            let model1 = YHBasicInfoCellModel(question: "1、是否曾被拒绝入境/递解/遣送或要求离开香港?", answer: "N", additionDes: "")
            let model2 = YHBasicInfoCellModel(question: "2、是否曾被拒绝签发签证／进入许可以入境香港？", answer: "Y", additionDes: "")
            let arr = [model1,model2]
            
            let sessionModel = YHBasicInfoSessionModel(sessionTitle: "子女 - xxx", arrQuestionItem: arr)
            arrData.append(sessionModel)
        }
        
        
        do {
            //家庭背景
            let model1 = YHBasicInfoCellModel(question:"1、至少一名直系家庭成员（已婚配偶、父母、兄弟姊妹、子女）是现居于香港的香港永久性居民", answer: "", additionDes: "")
            let arr = [model1]
            
            let sessionModel = YHBasicInfoSessionModel(sessionTitle: "家庭背景", arrQuestionItem: arr)
            arrData.append(sessionModel)
        }
        
        arrBasicInfoSessionDataForEdit = arrData
    }
}
