
import 'package:flutter/material.dart';

import '../../constants.dart';
import '../../generated/l10n.dart';
import '../../store/actions.dart';
import '../../store/store.dart';

/// “My Cards” 页（移动端）：已停止保存银行卡（Stripe 移除）。改为展示 e-Transfer 说明。
class MobileMyCards extends StatelessWidget {
  const MobileMyCards({Key? key});

  @override
  Widget build(BuildContext context) {
    store.dispatch(UpdateContext(context));

    return Scaffold(
      appBar: AppBar(
        leading: IconButton(
          icon: const Icon(Icons.arrow_back_ios),
          onPressed: () => Navigator.of(context).pop(),
        ),
        title: Text(S.of(context).my_cards),
        backgroundColor: Theme.of(context).primaryColor,
      ),
      body: ListView(
        children: [
          Container(
            margin: const EdgeInsets.all(16),
            padding: const EdgeInsets.all(16),
            decoration: BoxDecoration(
              color: Colors.lightBlueAccent.withOpacity(0.08),
              borderRadius: BorderRadius.circular(12),
              border: Border.all(color: Colors.black12),
            ),
            child: Column(
              crossAxisAlignment: CrossAxisAlignment.start,
              children: [
                const Row(
                  children: [
                    Icon(Icons.info_outline, color: Colors.lightBlueAccent),
                    SizedBox(width: 8),
                    Expanded(
                      child: Text(
                        'Saved cards are no longer used',
                        style: TextStyle(
                            fontSize: 16, fontWeight: FontWeight.bold),
                      ),
                    ),
                  ],
                ),
                const SizedBox(height: 12),
                const Text(
                  'We have switched to Interac e-Transfer for payments. '
                  'You no longer need to save a credit card.',
                ),
                const SizedBox(height: 16),
                const Text('Send your e-Transfer to:'),
                const SizedBox(height: 4),
                SelectableText(
                  Constants.ETRANSFER_EMAIL,
                  style: const TextStyle(
                      fontSize: 16, fontWeight: FontWeight.bold),
                ),
                const SizedBox(height: 12),
                const Text(
                  'Remember to put your order code (e.g. R#<order id>) in the '
                  'e-Transfer message so we can process your order automatically.',
                  style: TextStyle(color: Colors.black54),
                ),
              ],
            ),
          ),
        ],
      ),
    );
  }
}
