import 'package:cs_resources/generated/l10n.dart';
import 'package:flutter/material.dart';

class AddCardState {
  //表单的校验与数据
  final Map<String, Map<String, dynamic>> formData;

  AddCardState({
    Map<String, Map<String, dynamic>>? formData,
  }) : formData = formData ??
            {
              'card_name': {
                'value': '',
                'controller': TextEditingController(),
                'hintText': S.current.name_on_card,
                'focusNode': FocusNode(),
                'obsecure': false,
              },
              'card_number': {
                'value': '',
                'controller': TextEditingController(),
                'hintText': S.current.card_number,
                'focusNode': FocusNode(),
                'obsecure': false,
              },
              'month': {
                'value': '',
                'controller': TextEditingController(),
                'hintText': 'MM',
                'focusNode': FocusNode(),
                'obsecure': false,
              },
              'year': {
                'value': '',
                'controller': TextEditingController(),
                'hintText': 'YY',
                'focusNode': FocusNode(),
                'obsecure': false,
              },
              'cyc': {
                'value': '',
                'controller': TextEditingController(),
                'hintText': 'CYC',
                'focusNode': FocusNode(),
                'obsecure': false,
              },
            };
}
