import 'package:absensi_sas/app/constant.dart';
import 'package:flutter/material.dart';

class AprrovalCardStatusWidget extends StatelessWidget {
  const AprrovalCardStatusWidget(
      {super.key, required this.statusID, required this.statusName});
  final String statusID;
  final String statusName;

  @override
  Widget build(BuildContext context) {
    switch (statusID) {
      case "1":
        return Container(
          decoration: BoxDecoration(
              color: Constant.bgGreen,
              borderRadius: BorderRadius.only(
                  bottomLeft: Radius.circular(16),
                  bottomRight: Radius.circular(16))),
          padding: EdgeInsets.symmetric(
              horizontal: Constant.getActualXPhone(context: context, x: 20),
              vertical: Constant.getActualYPhone(context: context, y: 16)),
          width: MediaQuery.of(context).size.width,
          child: Text(
            statusName,
            style: Constant.body_12(context: context)
                .copyWith(color: Constant.primaryGreen),
          ),
        );
      case "2":
        return Container(
          decoration: BoxDecoration(
              color: Constant.bgRed,
              borderRadius: BorderRadius.only(
                  bottomLeft: Radius.circular(16),
                  bottomRight: Radius.circular(16))),
          padding: EdgeInsets.symmetric(
              horizontal: Constant.getActualXPhone(context: context, x: 20),
              vertical: Constant.getActualYPhone(context: context, y: 16)),
          width: MediaQuery.of(context).size.width,
          child: Text(
            statusName,
            style: Constant.body_12(context: context)
                .copyWith(color: Constant.primaryRed),
          ),
        );

      default:
        return Container();
    }
  }
}
