import SwiftUI
import Bedrock

struct TodayHeaderView: View {
    private let dateText: String

    init(dateText: String) {
        self.dateText = dateText
    }

    var body: some View {
        VStack(alignment: .leading, spacing: Design.Spacing.xxxSmall) {
            Text(String(localized: "Today"))
                .font(.largeTitle)
                .foregroundStyle(AppTextColors.primary)
                .bold()
            Text(dateText)
                .font(.subheadline)
                .foregroundStyle(AppTextColors.secondary)
        }
        .frame(maxWidth: .infinity, alignment: .leading)
        .accessibilityElement(children: .combine)
    }
}

#Preview {
    TodayHeaderView(dateText: "Sunday, January 25")
        .padding(Design.Spacing.large)
        .background(AppSurface.primary)
}
