import 'package:e_commerce_training/res/R.dart';
import 'package:e_commerce_training/src/util/navigation_util.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

class NoticeChange extends StatelessWidget {
  VoidCallback onClick;

  NoticeChange({required this.onClick});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: R.color.white.withOpacity(0.5),
      body: Center(
        child: Container(
          height: 200.h,
          margin: EdgeInsets.symmetric(horizontal: 20),
          padding: EdgeInsets.symmetric(vertical: 20, horizontal: 20),
          decoration: BoxDecoration(
            borderRadius: BorderRadius.circular(10),
            color: R.color.white,
          ),
          child: Column(
            children: [
              Text(
                R.string.confirm_change.tr(),
                style: TextStyle(
                  fontSize: 18.sp,
                  fontWeight: FontWeight.w600,
                  color: R.color.black,
                ),
              ),
              SizedBox(height: 20),
              Text(
                R.string.consumption.tr(),
                style: TextStyle(
                  fontSize: 16.sp,
                  fontWeight: FontWeight.w400,
                  color: R.color.black,
                ),
                maxLines: 3,
                textAlign: TextAlign.center,
              ),
              SizedBox(height: 20),
              Row(
                children: [
                  Expanded(
                    child: InkWell(
                      onTap: () => NavigationUtil.pop(context),
                      child: Container(
                        padding: EdgeInsets.symmetric(vertical: 10),
                        decoration: BoxDecoration(
                          borderRadius: BorderRadius.circular(20),
                          color: R.color.grey100,
                        ),
                        child: Center(
                          child: Text(
                            R.string.cancel.tr(),
                            style: TextStyle(
                              fontSize: 18.sp,
                              fontWeight: FontWeight.w600,
                              color: R.color.black,
                            ),
                          ),
                        ),
                      ),
                    ),
                    flex: 1,
                  ),
                  SizedBox(width: 20),
                  Expanded(
                    child: InkWell(
                      onTap: onClick,
                      child: Container(
                        padding: EdgeInsets.symmetric(vertical: 10),
                        decoration: BoxDecoration(
                          borderRadius: BorderRadius.circular(20),
                          color: Colors.teal,
                        ),
                        child: Center(
                          child: Text(
                            R.string.next.tr(),
                            style: TextStyle(
                              fontSize: 18.sp,
                              fontWeight: FontWeight.w600,
                              color: R.color.white,
                            ),
                          ),
                        ),
                      ),
                    ),
                    flex: 1,
                  ),
                ],
              ),
            ],
          ),
        ),
      ),
    );
  }
}
