import 'package:cs_resources/generated/assets.dart';
import 'package:cs_resources/generated/l10n.dart';
import 'package:cs_resources/theme/app_colors_theme.dart';
import 'package:flutter/material.dart';
import 'package:plugin_platform/engine/toast/toast_engine.dart';
import 'package:shared/utils/log_utils.dart';
import 'package:widgets/ext/ex_widget.dart';
import 'package:widgets/my_button.dart';
import 'package:widgets/my_load_image.dart';
import 'package:widgets/my_text_view.dart';

import '../register/visitor_register_page.dart';

class VisitorNowLarge extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    Log.d("VisitorNowLarge 初始化");

    return Container(
      padding: const EdgeInsets.symmetric(horizontal: 38),
      width: double.infinity,
      height: double.infinity,
      child: Center(
        child: Column(
          mainAxisSize: MainAxisSize.min,
          crossAxisAlignment: CrossAxisAlignment.center,
          children: [
            const MyAssetImage(Assets.mainVisitorNowImg, width: 214, height: 164.5).marginOnly(top: 21, bottom: 25.5),
            MyTextView(
              S.current.visitor_msg,
              fontSize: 15,
              textAlign: TextAlign.center,
              isFontMedium: true,
              textColor: context.appColors.textBlack,
            ),
            MyButton(
              onPressed: () {
                VisitorRegisterPage.startInstance(context: context);
              },
              text: S.current.visitor_registration,
              textColor: Colors.white,
              disabledTextColor: Colors.white,
              backgroundColor: context.appColors.btnBgDefault,
              fontWeight: FontWeight.w500,
              type: ClickType.throttle,
              minHeight: 50,
              radius: 5,
            ).marginOnly(top: 32, bottom: 48),
          ],
        ),
      ),
    );
  }
}
