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

import SwiftUI

/// 设置页底部悬浮提交栏。
struct ScenicPromotionSettingsSubmitBarView: View {
    let onSubmit: () -> Void

    var body: some View {
        VStack(spacing: 0) {
            Divider()
            Button(action: onSubmit) {
                Text("提交设置")
                    .font(.system(size: 17, weight: .bold))
                    .foregroundStyle(.white)
                    .frame(maxWidth: .infinity)
                    .frame(height: 50)
                    .background(AppDesign.primary, in: RoundedRectangle(cornerRadius: 14))
            }
            .buttonStyle(.plain)
            .padding(.horizontal, 16)
            .padding(.top, 10)
            .padding(.bottom, 10)
        }
        .background(.ultraThinMaterial)
    }
}

#if DEBUG
#Preview("提交栏") {
    ScenicPromotionSettingsSubmitBarView(onSubmit: {})
}
#endif
