import SwiftUI

struct WeekendsStepView: View {
    @Binding var includeWeekends: Bool
    var onNext: () -> Void

    var body: some View {
        VStack(spacing: 24) {
            Text("weekends_title")
                .font(.mealMoodH1)
                .foregroundColor(.mealMoodTextPrimary)
                .multilineTextAlignment(.leading)
                .frame(maxWidth: .infinity, alignment: .leading)
                .padding(.horizontal, 24)
                .padding(.top, 12)

            VStack(spacing: 16) {
                HStack {
                    VStack(alignment: .leading, spacing: 4) {
                        Text("weekends_toggle")
                            .font(.mealMoodBody)
                            .foregroundColor(.mealMoodTextPrimary)
                    }
                    Spacer()
                    Toggle("", isOn: $includeWeekends)
                        .tint(.mealMoodCoral)
                        .labelsHidden()
                }
                .padding(16)
                .background(Color.mealMoodSurface)
                .cornerRadius(14)
                .overlay(
                    RoundedRectangle(cornerRadius: 14)
                        .stroke(Color(hex: "#F0F0F0"), lineWidth: 1)
                )
            }
            .padding(.horizontal, 24)

            Text("weekends_note")
                .font(.mealMoodSmall)
                .foregroundColor(.mealMoodTextSecondary)

            PrimaryButton(title: String(localized: "onboarding_continue"), action: onNext)
                .padding(.horizontal, 24)
                .padding(.top, 8)
                .padding(.bottom, 40)
        }
        .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .top)
    }
}
