//
//  QSLJumpManager.swift
//  QuickSearchLocation
//
//  Created by Destiny on 2024/12/24.
//

import Foundation

enum JumpType: Int {
    case createInspration = 0   // 灵感创作
    case createDiy              // 自定义创作
    case mine                   // 我的
    case vip                    // 会员
    case login                  // 登录
    case accompaniment          // 伴奏
}

class QSLJumpManager: NSObject {
    
    static let shared = QSLJumpManager()
    
    private override init() {}
}

extension QSLJumpManager {
    
    // 跳转到Vip页面
    func pushToVip(type: QSLVipJumpType) {
        
        let vc = QSLVipController()
        vc.type = type
        self.rootViewController()?.pushVC(vc: vc)
    }
    
    // 跳转到登录页面
    func pushToLogin(type: QSLLoginJumpType) {
        
        let vc = QSLLoginViewController()
        vc.type = type
        self.rootViewController()?.pushVC(vc: vc)
    }
    
    // 跳转到紧急联系人页面
    func pushToContact(type: QSLContactJumpPage) {
        
        let vc = QSLContactController()
        vc.type = type
        self.rootViewController()?.pushVC(vc: vc)
    }
    
    // 跳转到轨迹页面
    func pushToRoad(type: QSLRoadJumpType, model: QSLUserModel) {
        
        let vc = QSLRoadController(userModel: model)
        vc.type = type
        self.rootViewController()?.pushVC(vc: vc)
    }
    
    // 跳转到添加好友页面
    func pushToAdd(type: QSLAddJumpType) {
        
        let vc = QSLAddController()
        vc.type = type
        self.rootViewController()?.pushVC(vc: vc)
    }
}

