import 'package:electronic_assistant/base/base_page.dart';
import 'package:electronic_assistant/data/bean/store_item.dart';
import 'package:electronic_assistant/resource/colors.gen.dart';
import 'package:electronic_assistant/resource/string.gen.dart';
import 'package:electronic_assistant/utils/expand.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:get/get_core/src/get_main.dart';

import '../../resource/assets.gen.dart';
import 'controller.dart';

class ModelExplainPage extends BasePage<ModelExplainController> {
  const ModelExplainPage({super.key});

  @override
  Color backgroundColor() {
    return '#F6F6F6'.color;
  }

  @override
  Widget buildBody(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.transparent,
      appBar: AppBar(
        systemOverlayStyle: SystemUiOverlayStyle.dark,
        backgroundColor: Colors.transparent,
        title: Text(StringName.mainDrawerModel.tr,
            style:
                TextStyle(fontSize: 17.sp, color: ColorName.primaryTextColor)),
        centerTitle: true,
        leading: IconButton(
          icon: SizedBox(
              width: 24.w, height: 24.w, child: Assets.images.iconBack.image()),
          onPressed: () {
            Get.back();
          },
        ),
      ),
      body: _buildContentView(),
    );
  }

  Widget _buildContentView() {
    return Column(
      children: [
        SizedBox(height: 16.h),
        Container(
          decoration: BoxDecoration(
            color: ColorName.white,
            borderRadius: BorderRadius.circular(8.w),
          ),
          margin: EdgeInsets.symmetric(horizontal: 12.w),
          padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 14.w),
          child: Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            children: [
              Row(
                children: [
                  Assets.images.iconModelExplain
                      .image(width: 32.w, height: 32.w),
                  SizedBox(width: 6.w),
                  Column(
                    crossAxisAlignment: CrossAxisAlignment.start,
                    children: [
                      Assets.images.iconModelExplainLogo.image(height: 19.w),
                      Text(
                        StringName.mainDrawerModel.tr,
                        style: TextStyle(
                            fontSize: 9.sp,
                            color: ColorName.secondaryTextColor),
                      )
                    ],
                  )
                ],
              ),
              SizedBox(height: 10.h),
              Text(
                '模型名称：${StringName.modelExplainName.tr}',
                style: TextStyle(
                    fontSize: 13.sp, color: ColorName.secondaryTextColor),
              ),
              Text(
                '备案号：${StringName.modelExplainRecordNumber.tr}',
                style: TextStyle(
                    fontSize: 13.sp, color: ColorName.secondaryTextColor),
              )
            ],
          ),
        )
      ],
    );
  }
}
