//
//  FeatureRow.swift
//  AlloVoisinsSwiftUI
//
//  Created by Victor on 22/01/2025.
//

import SwiftUI

struct FeatureRow: View {
    let feature: PricingFeature

    var body: some View {
        HStack(alignment: .top) {
            SQText(" • ")
                .sqSize(14)
            SQText("\(feature.description)")
                .sqSize(14)
            Spacer()
            switch feature.value {
            case .boolean(let isIncluded):
                SQIcon(isIncluded ? .check : .xmark,
                      size: .l,
                      type: .solid,
                      color: isIncluded ? .sqSemanticGreen : .sqSemanticRed)
            case .text(let text):
                SQText(text)
                    .sqSize(14)
                    .sqFont(.semiBold)
            }
        }
    }
}
