import 'package:fis_i18n/i18n.dart';
import 'package:fis_ui/base_define/page.dart';
import 'package:fis_ui/index.dart';
import 'package:fis_ui/values/font_sizes.dart';
import 'package:flutter/material.dart';
import 'package:flyinsono/architecture/define.dart';
import 'package:flyinsono/pages/user/user_id_auth_apply/controller.dart';

///上传用户角色信息弹出层头部
class UploadUserIdDialogHeader extends FisView<UserIdAuthApplyController>
    implements FPage {
  @override
  final String pageName = 'UploadUserIdDialogHeader';
  @override
  FWidget build(BuildContext context) {
    final roleInfo = controller.roleInfo;
    return FObx(() {
      return FAnimatedContainer(
        duration: const Duration(milliseconds: 500),
        height: 40,
        padding: const EdgeInsets.only(left: 24, right: 8),
        decoration: BoxDecoration(
          gradient: LinearGradient(
            colors: [roleInfo.startColor, roleInfo.endColor],
          ),
          borderRadius: const BorderRadius.only(
            topLeft: Radius.circular(8),
            topRight: Radius.circular(8),
          ),
        ),
        child: FRow(
          mainAxisSize: MainAxisSize.max,
          mainAxisAlignment: MainAxisAlignment.spaceBetween,
          children: [
            FRow(
              mainAxisSize: MainAxisSize.min,
              children: [
                FIcon(
                  FIcons.vip,
                  color: roleInfo.endColor,
                  size: 32,
                ),
                FSizedBox(width: 6),
                FText(
                  i18nBook.user.verificationApply.t,
                  style: TextStyle(fontSize: FFontSizes.H5),
                ),
              ],
            ),
            FIconButton(
              businessParent: this,
              name: "close",
              splashRadius: 18,
              onPressed: () {
                Navigator.of(context).pop();
              },
              icon: FIcon(
                Icons.close,
                size: 18,
                color: Colors.white,
              ),
            ),
          ],
        ),
      );
    });
  }
}
