//
//  QSLHomeViewModel.swift
//  QuickSearchLocation
//
//  Created by mac on 2024/4/11.
//

import UIKit

class QSLHomeViewModel: NSObject {
    
    struct UX {
        static let viewRight: CGFloat = -12
        static let twofriendViewHeight: CGFloat = 281
        static let moreThanTwoFriViewHeight: CGFloat = 320
        static let friendViewHeight: CGFloat = 355.rpx
    }
    
    var friendViewHeight: CGFloat = 0
    
    var friendList: [QSLUserModel] = [QSLUserModel]()
    
    var friendLocationList: [QSLMapPointModel] = [QSLMapPointModel]()
    
    typealias completionClosure = () -> Void
    
    func initUIData() {
        friendViewHeight = UX.friendViewHeight
    }
}

extension QSLHomeViewModel {
    
//    func refreshDataSoure(complete: completionClosure) {
//        
//        friendList = [QSLUserModel]()
//        for _ in 0...4 {
//            let model = QSLUserModel()
//            friendList?.append(model)
//        }
//        if let friendList = self.friendList {
//            if friendList.count < 2 {
//                friendViewHeight = UX.twofriendViewHeight
//            } else {
//                friendViewHeight = UX.moreThanTwoFriViewHeight
//            }
//        }
//        complete()
//    }
}
