//
//  ScenicPromotionPreviewSupport.swift
//  suixinkan
//
//  Created by Codex on 2026/7/2.
//

import Foundation

#if DEBUG
/// 宣传页 Preview 工厂，提供预置 ViewModel 与 Mock 数据。
@MainActor
enum ScenicPromotionPreviewSupport {
    /// 返回指定演示场景的主页面 ViewModel。
    static func mainViewModel(scenario: ScenicPromotionDemoScenario = .normal) -> ScenicPromotionViewModel {
        let viewModel = ScenicPromotionViewModel()
        viewModel.applyScenario(scenario)
        return viewModel
    }

    /// 返回指定演示场景的设置页 ViewModel。
    static func settingsViewModel(scenario: ScenicPromotionSettingsDemoScenario = .normal) -> ScenicPromotionSettingsViewModel {
        let viewModel = ScenicPromotionSettingsViewModel()
        viewModel.applyScenario(scenario)
        return viewModel
    }

    /// 预览用看板数据。
    static var sampleBoard: ScenicPromotionBoard {
        ScenicPromotionMockStore.mockBoard
    }

    /// 预览用排队信息。
    static var sampleQueue: ScenicPromotionQueueInfo {
        sampleBoard.spots[0].queue!
    }

    /// 预览用视频素材。
    static var sampleVideoMedia: ScenicPromotionMedia {
        sampleBoard.spots[0].videos[0]
    }

    /// 预览用已上传素材。
    static var sampleManagedMaterial: ScenicPromotionManagedMaterial {
        ScenicPromotionMockStore.mockMaterialsByPointID["material_bridge"]!.first!
    }
}
#endif
