import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';

import '../../config/config.dart';

class CustomBottomSheetContainer extends StatelessWidget {
  final Function() onTap;
  final String label;
  final  Color?  buttonColor;
  final Color?  fontColor;
  final double? widthFactor;
  double headerHeight = SizeConfig.heightMultiplier! * 12;

  CustomBottomSheetContainer({Key? key, required this.onTap, required this.label, this.buttonColor = const Color(0xFF359846) , this.fontColor =  Colors.white, this.widthFactor = .80 }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      decoration: BoxDecoration(
        color: Colors.white,
        borderRadius: BorderRadius.all(
          Radius.circular(0.0),
        ),
        border: Border.all(color: HexColor('#EFEFEF'), width: 1),
      ),
      height: headerHeight,
      width: double.infinity,
      child: Column(
        children: [
          Container(
            margin: EdgeInsets.only(top: headerHeight * (SizeConfig.isWidthLarge ? 0.3 : 0.2)),
            child: FractionallySizedBox(
              widthFactor: widthFactor,
              child: Center(
                child: AppButton(
                  fontColor: fontColor!,
                  title: label,
                  color: this.buttonColor ,
                  onPressed: onTap,
                ),
              ),
            ),
          ),
          SizedBox(
            height: 5,
          ),
        ],
      ),
    );
  }
}
