import 'package:flutter/material.dart';
import 'package:get/get.dart';
import '../index.dart';

class BluetoothNoCardReaderView extends GetView<BluetoothCardReaderController> {
  const BluetoothNoCardReaderView({super.key});
  @override
  Widget build(BuildContext context) {
    return Column(
      mainAxisAlignment: MainAxisAlignment.center,
      children: [
        const Icon(
          Icons.warning_amber_rounded,
          size: 80,
          color: Colors.red,
        ),
        const SizedBox(height: 20),
        const Text(
          '未连接蓝牙读卡器',
          style: TextStyle(
            fontSize: 26,
            fontWeight: FontWeight.bold,
          ),
        ),
        const SizedBox(height: 20),
        const Text(
          '请连接蓝牙读卡器后重试',
          style: TextStyle(
            fontSize: 18,
            color: Colors.grey,
          ),
          textAlign: TextAlign.center,
        ),
        const SizedBox(height: 20),
        ElevatedButton(
          onPressed: () {
            controller.connectDevice();
          },
          child: const Text(
            '重试',
            style: TextStyle(fontSize: 20),
          ),
        ),
        const SizedBox(height: 40),
      ],
    );
  }
}
