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

import SwiftUI

/// 设置页正常内容区域。
struct ScenicPromotionSettingsContentView: View {
    @ObservedObject var viewModel: ScenicPromotionSettingsViewModel
    let onUploadFailed: () -> Void

    var body: some View {
        ScrollView(showsIndicators: false) {
            VStack(spacing: 16) {
                ScenicPromotionSettingsHeaderView()
                ScenicPromotionSettingsQueueBindingCard(viewModel: viewModel)
                ScenicPromotionSettingsMaterialPointCard(viewModel: viewModel)
                ScenicPromotionSettingsMaterialUploadCard(
                    viewModel: viewModel,
                    kind: .video,
                    onUploadFailed: onUploadFailed
                )
                ScenicPromotionSettingsMaterialUploadCard(
                    viewModel: viewModel,
                    kind: .image,
                    onUploadFailed: onUploadFailed
                )
            }
            .padding(.horizontal, 16)
            .padding(.top, 14)
            .padding(.bottom, 28)
        }
    }
}

#if DEBUG
#Preview("设置页内容") {
    ScenicPromotionSettingsContentView(
        viewModel: ScenicPromotionPreviewSupport.settingsViewModel(),
        onUploadFailed: {}
    )
    .background(AppDesign.background)
}
#endif
