//
//  PricingSubscribeFooter.swift
//  AlloVoisinsSwiftUI
//
//  Created by Victor on 21/01/2025.
//

import SwiftUI

struct PricingSubscribeFooter: View {
    var pricing: Pricing

    var body: some View {
        VStack {
            SQText(pricing.footerPrimaryText)
                .sqSize(18)
                .sqFont(.bold)
                .sqColor(pricing.footerTextColor)
            if !pricing.footerSecondaryText.isEmpty {
                SQText(pricing.footerSecondaryText)
                    .sqSize(13)
                    .sqColor(pricing.footerTextColor)
            }
            SQButton("Continuer") {

            }
            .sqColorScheme(pricing.footerButtonColor)

            if !pricing.footerTertiaryText.isEmpty {
                SQText(pricing.footerTertiaryText)
                    .sqSize(12)
                    .sqColor(.sqOrange(70))
            }
        }
        .padding()
        .frame(maxWidth: .infinity, alignment: .center)
        .background(pricing.footerBackgroundColor)
        .cornerRadius(8)
        .shadow(color: Color(red: 0.09, green: 0.14, blue: 0.2).opacity(0.1), radius: 8, x: 0, y: -4)
    }
}

#Preview {
    PricingSubscribeFooter(pricing: .standard)
}
