import 'package:betting/commom/utils/color_utils.dart';
import 'package:betting/view/mobile/splash/splash_controller.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import '../../../commom/utils/bannerAd.dart';
import '../../../routes/app_pages.dart';


class SplashPage extends StatelessWidget {
  final controller = Get.put(SplashController());

  SplashPage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      resizeToAvoidBottomInset: true,
      body: Container(
        decoration: const BoxDecoration(
          image: DecorationImage(
            image: AssetImage("assets/images/background_app_betting.jpg"),
            fit: BoxFit.cover,
          ),
        ),
        alignment: Alignment.topCenter,
        child: Column(
          children: [
            SizedBox(
              height: 60.h,
            ),
            const BannerAdContainer(),
            Text("Betting",style: TextStyle(
                fontSize: 35.sp,
                color: Colors.white,
                fontFamily: 'assets/font/static/Inter-Medium.ttf',
                fontWeight: FontWeight.w500)),
            Expanded(child:  SingleChildScrollView(
              child: Column(
                children: [
                  Container(
                    margin: EdgeInsets.only(top: 16.h),
                    child:  Text(
                      'We Respect Your Privacy',
                      textAlign: TextAlign.left,
                      style: TextStyle(
                          fontSize: 16.sp,
                          color: Colors.white60,
                          fontFamily: 'assets/font/static/Inter-Medium.ttf',
                          fontWeight: FontWeight.w500),
                    ),
                  ),
                  Container(
                    margin: EdgeInsets.only(top: 16.h,left: 16.w,right: 16.w),
                    child:  Text(
                      'We and our partners store and/or access information on a device, such as unique IDs in cookies to process personal data. You may accept or manage your choices by clicking below, including your right to object where legitimate interest is used, or at any time in the privacy policy page. These choices will be signaled to our partners and will not affect browsing data.',
                      textAlign: TextAlign.center,
                      style: TextStyle(
                          color: const Color.fromRGBO(133, 133, 133, 1),
                          fontSize: 14.sp,
                          fontFamily: 'static/Inter-Regular.ttf'),
                    ),
                  ),
                  SizedBox(
                    height: 24.h,
                  ),
                  Text(
                    'Cookie Policy',
                    textAlign: TextAlign.left,

                    style: TextStyle(
                      fontSize: 16.sp,
                      color: Colors.blueAccent,
                      fontFamily: 'assets/font/static/Inter-Medium.ttf',
                      fontWeight: FontWeight.w500, decoration: TextDecoration.underline,),
                  ),
                  SizedBox(
                    height: 16.h,
                  ),
                  Text(
                    'You\'re In Control' ,
                    textAlign: TextAlign.left,
                    style: TextStyle(
                        fontSize: 16.sp,
                        color: Colors.white60,
                        fontFamily: 'assets/font/static/Inter-Medium.ttf',
                        fontWeight: FontWeight.w500),
                  ),
                  Container(
                    margin: EdgeInsets.only(top: 16.h,left: 16.w,right: 16.w),
                    child:  Text(
                      "If you accept, we may do the following: Use precise geolocation data. Actively scan device characteristics for identification. Store and/or access information on a device. Personalised ads and content, ad and content measurement, audience insights and product development",
                      textAlign: TextAlign.center,
                      style: TextStyle(
                          color: const Color.fromRGBO(133, 133, 133, 1),
                          fontSize: 14.sp,
                          fontFamily: 'static/Inter-Regular.ttf'),
                    ),
                  ),
                ],
              ),
            )),
            Text(
              'List of Partners (vendors)',
              textAlign: TextAlign.left,
              style: TextStyle(
                fontSize: 16.sp,
                color: ColorUtils.PRIMARY_COLOR,
                fontFamily: 'assets/font/static/Inter-Medium.ttf',
                fontWeight: FontWeight.w500, decoration: TextDecoration.underline,),
            ),
            SizedBox(height: 16.h,),
            Container(
              margin: EdgeInsets.symmetric(horizontal: 16.w),
              width: double.infinity,
              height: 32.h,
              child: ElevatedButton(
                  onPressed: () {
                    Get.toNamed(Routes.started);
                  },
                  style: ElevatedButton.styleFrom(
                      shape: RoundedRectangleBorder(
                          borderRadius: BorderRadius.circular(6)),
                      backgroundColor:  ColorUtils.PRIMARY_COLOR),
                  child: Text(
                    'I Accept',
                    style: TextStyle(fontSize: 16.sp,color: Colors.black),
                  )),
            ),
            SizedBox(height: 16.h,),
            Text(
              'Show Purposes',
              textAlign: TextAlign.left,
              style: TextStyle(
                fontSize: 16.sp,
                color: ColorUtils.PRIMARY_COLOR,
                fontFamily: 'assets/font/static/Inter-Medium.ttf',
                fontWeight: FontWeight.w500, decoration: TextDecoration.underline,),
            ),
            SizedBox(height: 32.h,)
          ],
        ),
      ),
    );
  }
}
