import SwiftUI

// MARK: - 测试自动选择按钮
struct TestAutoSelectButton: View {
    @EnvironmentObject var languageManager: LanguageManager
    let detectedCode: DetectedCode
    let onSelect: (DetectedCode) -> Void
    
    var body: some View {
        VStack {
            HStack {
                Spacer()
                Button("test_auto_select".localized) {
                    onSelect(detectedCode)
                }
                .id(languageManager.refreshTrigger)
                .foregroundColor(.white)
                .padding(8)
                .background(Color.red)
                .cornerRadius(8)
                .padding(.trailing, 20)
            }
            Spacer()
        }
    }
} 