//
//  MarketingSupportSelectionView.swift
//  AlloVoisinsSwiftUI
//
//  Created by Victor on 12/11/2024.
//

import SwiftUI

struct MarketingSupportSelectionView: View {
    @State var goToNext: Bool = false

    var body: some View {
        ScrollView {
            VStack(spacing: 16) {
                Spacer()
                    .frame(height: 16)
                // Visit cards
                VStack(alignment: .leading, spacing: 0) {
                    SQImage("visit_card_new", height: 200)
                        .cornerRadius(8, corners: [.topLeft, .topRight])
                    HStack {
                        SQText("Mes cartes de visite")
                            .sqSize(18)
                            .sqFont(.bold)
                        Spacer()
                        SQImage("for_pro_icon", height: 13)
                    }
                    .padding(16)
                }
                .overlay(
                    RoundedRectangle(cornerRadius: 8)
                        .inset(by: 0.5)
                        .stroke(Color.sqNeutral(20), lineWidth: 1)
                )
                .onTapGesture {
                    self.goToNext.toggle()
                }
                .fixedSize(horizontal: true, vertical: false)

                // Flyers
                VStack(alignment: .leading, spacing: 0) {
                    SQImage("flyers", height: 200)
                        .cornerRadius(8, corners: [.topLeft, .topRight])
                    HStack {
                        SQText("Mes prospetus")
                            .sqSize(18)
                            .sqFont(.bold)
                        Spacer()
                        SQImage("for_pro_icon", height: 13)
                    }
                    .padding(16)
                }
                .overlay(
                    RoundedRectangle(cornerRadius: 8)
                        .inset(by: 0.5)
                        .stroke(Color.sqNeutral(20), lineWidth: 1)
                )
                .fixedSize(horizontal: true, vertical: false)

                // Quotes
                VStack(alignment: .center, spacing: 0) {
                    SQImage("quotes", height: 200)
                        .cornerRadius(8, corners: [.topLeft, .topRight])
                    HStack {
                        SQText("Mes prospetus")
                            .sqSize(18)
                            .sqFont(.bold)
                        Spacer()
                        SQImage("for_pro_icon", height: 13)
                    }
                    .padding(16)
                }
                .overlay(
                    RoundedRectangle(cornerRadius: 8)
                        .inset(by: 0.5)
                        .stroke(Color.sqNeutral(20), lineWidth: 1)
                )
                .fixedSize(horizontal: true, vertical: false)
            }
        }
        .scrollIndicators(.hidden)
        .sqNavigationBar(title: "Mes supports de communication")
        .navigationDestination(isPresented: $goToNext) {
            CardTemplateSelectionView()
        }
    }
}

#Preview {
    MarketingSupportSelectionView()
}
