import 'package:flutter/material.dart';
import 'package:gap/gap.dart';
import 'package:tanami_app/core/routes/routes.dart';
import 'package:tanami_app/core/styles/app_color.dart';
import 'package:tanami_app/core/styles/app_text.dart';

import '../../../../../../shared/components/text_widget.dart';

class InvestmentOverSubscribedDialog extends StatelessWidget {
  const InvestmentOverSubscribedDialog({super.key});

  @override
  Widget build(BuildContext context) {
    return AlertDialog(
      backgroundColor: AppColor.plainWhite,
      shape: RoundedRectangleBorder(
        borderRadius: BorderRadius.circular(20),
      ),
      title: Column(
        crossAxisAlignment: CrossAxisAlignment.end,
        children: [
          IconButton(
            icon: const Icon(
              Icons.close_sharp,
              color: AppColor.hintTextColor,
            ),
            onPressed: () {
              goRouter.pop();
            },
          ),
          TextWidget().text17W700(
            AppText.unableToProcessTransactionText,
            clr: AppColor.textLabelColor,
          ),
        ],
      ),
      content: Column(
        mainAxisSize: MainAxisSize.min,
        children: [
          TextWidget().text15W500(
            AppText.investmentOpportunityHasReachedMaxcapText,
            clr: AppColor.hintTextColor,
          ),
          const Gap(20),
          GestureDetector(
            onTap: () {
              goRouter.pop();
              goRouter.pop();
              goRouter.pop();
            },
            child: TextWidget().text14W500(AppText.backToInvestmentText,
                textDecoration: TextDecoration.underline,
                clr: AppColor.otpTextColor),
          ),
        ],
      ),
    );
  }
}
