import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:glassmorphism/glassmorphism.dart';
import 'package:traderscircuit/Utils/Common/sized_box.dart';
import 'package:traderscircuit/Utils/text.dart';

Widget CommonBtn({void Function()? onTap, required String text}) {
  return InkWell(
      onTap: onTap,
      child: Container(
        width: double.infinity,
        height: 50.h,
        decoration: BoxDecoration(
            color: Color(0xff9A0000), borderRadius: BorderRadius.circular(5)),
        child: Center(
          child: Text(
            text,
            textAlign: TextAlign.center,
            style: TextStyle(
              color: Colors.white,
              fontSize: 20.sp,
              fontFamily: 'hiragino',
              fontWeight: FontWeight.w400,
            ),
          ),
        ),
      ));
}

Widget CommonYesNoBtn({
  void Function()? yesonTap,
  void Function()? noonTap,
}) {
  return Row(
    children: [
      GestureDetector(
        onTap: yesonTap,
        child: GlassmorphicContainer(
          width: 170.w,
          height: 50.h,
          borderRadius: 8,
          blur: 10,
          alignment: Alignment.center,
          border: 0.9,
          linearGradient: LinearGradient(
            begin: Alignment.topLeft,
            end: Alignment.bottomRight,
            colors: [
              Colors.white.withOpacity(0.1),
              Color(0xFFFFFFFF).withOpacity(0.05),
            ],
            stops: [
              0.1,
              1,
            ],
          ),
          borderGradient: LinearGradient(
            begin: Alignment.topLeft,
            end: Alignment.bottomRight,
            colors: [
              Color.fromRGBO(70, 5, 1, 0.8),
              Color.fromRGBO(102, 102, 102, 0.8),
            ],
          ),
          child: Center(
            child: text18W500('Yes'),
          ),
        ),
      ),
      sizedBoxWidth(10.w),
      GestureDetector(
        onTap: noonTap,
        child: Container(
          height: 50.h,
          width: 170.w,
          decoration: BoxDecoration(
              borderRadius: BorderRadius.circular(8.r),
              border: Border.all(color: Color(0xFF9A0000), width: 1.w),
              color: Color(0xFF6C0000)),
          child: Center(child: text18W500('No')),
        ),
      )
    ],
  );
}

  // InkWell(
  //     onTap: onTap,
  //     child: Container(
  //       width: double.infinity,
  //       height: 50.h,
  //       decoration: BoxDecoration(
  //           color: Color(0xff9A0000), borderRadius: BorderRadius.circular(5)),
  //       child: Center(
  //         child: Text(
  //           text,
  //           textAlign: TextAlign.center,
  //           style: TextStyle(
  //             color: Colors.white,
  //             fontSize: 20.sp,
  //             fontFamily: 'Cambria',
  //             fontWeight: FontWeight.w400,
  //           ),
  //         ),
  //       ),
  //     ));
Widget kycBtn({
  void Function()? onTap,
  required String text,
  required Color bgClr,
  required Color borderClr,
}) {
  return InkWell(
    onTap: onTap,
    child: Container(
      width: 191,
      height: 50,
      decoration: ShapeDecoration(
        color: bgClr,
        shape: RoundedRectangleBorder(
          side: BorderSide(
            width: 1,
            color: borderClr,
          ),
          borderRadius: BorderRadius.circular(8),
        ),
      ),
      child: Center(
        child: Text(
          text,
          textAlign: TextAlign.center,
          style: TextStyle(
            color: Colors.white,
            fontSize: 20.sp,
            fontFamily: 'hiragino',
            fontWeight: FontWeight.w400,
          ),
        ),
      ),
    ),
  );
}
