import Foundation
import GenAPI

public struct FeatureComparisonResponse: Codable, Equatable {
    public var features: [FeatureRowResponse]
    public var sectionHeader: LocalizedTextResponse

    public init(features: [FeatureRowResponse], sectionHeader: LocalizedTextResponse) {
        self.features = features
        self.sectionHeader = sectionHeader
    }

    init(_ remote: GenAPI.FeatureComparisonResponse) {
        self.features = remote.features.map { FeatureRowResponse($0) }
        self.sectionHeader = LocalizedTextResponse(remote.sectionHeader)
    }
}
