import SwiftUI
import UIKit
import Bedrock

struct AddressTextField: View {
    let label: String
    let placeholder: String
    @Binding var text: String
    var textContentType: UITextContentType?
    var keyboardType: UIKeyboardType = .default

    var body: some View {
        VStack(alignment: .leading, spacing: Design.Spacing.xSmall) {
            Text(label)
                .typography(.caption)
                .foregroundStyle(Color.Text.secondary)

            TextField(placeholder, text: $text)
                .textContentType(textContentType)
                .keyboardType(keyboardType)
                .textInputAutocapitalization(.words)

            Divider()
        }
    }
}
