import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:gap/gap.dart';
import 'package:tanami_app/core/styles/app_color.dart';
import 'package:tanami_app/core/styles/app_images.dart';
import 'package:tanami_app/shared/components/text_widget.dart';

import '../../../../../core/styles/app_text.dart';

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

  @override
  Widget build(BuildContext context) {
    return Container(
      width: double.infinity,
      decoration: BoxDecoration(
        color: AppColor.plainWhite,
        borderRadius: const BorderRadius.all(Radius.circular(20.0)),
        boxShadow: [
          BoxShadow(
            color: AppColor.plainBlack.withOpacity(0.15),
            spreadRadius: 2,
            blurRadius: 10,
            offset: const Offset(0, 3), // changes position of shadow
          ),
        ],
      ),
      child: Padding(
        padding: const EdgeInsets.all(20.0),
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: [
            TextWidget().text15W700(
              AppText.includeddocs,
              clr: AppColor.plainBlack,
            ),
            Gap(
              16.h,
            ),
            GridView.count(
              physics: const NeverScrollableScrollPhysics(),
              shrinkWrap: true,
              childAspectRatio: 1.7,
              mainAxisSpacing: 10.h,
              crossAxisSpacing: 10.w,
              crossAxisCount: 2, // Number of columns
              children: List.generate(
                6,
                (index) {
                  return Center(
                    child: Container(
                      decoration: const BoxDecoration(
                        color: AppColor.documentCardBgColor,
                        borderRadius: BorderRadius.all(Radius.circular(10.0)),
                      ),
                      padding: const EdgeInsets.all(15.0),
                      child: Column(
                        children: [
                          Row(
                            children: [
                              Image.asset(
                                AppImages.documentIcon,
                                height: 16.sp,
                              ),
                              Gap(
                                7.w,
                              ),
                              TextWidget().text12W700("Filename.pdf",
                                  clr: AppColor.plainBlack),
                            ],
                          ),
                          Gap(
                            20.h,
                          ),
                          Expanded(
                            child: Row(
                              crossAxisAlignment: CrossAxisAlignment.end,
                              mainAxisAlignment: MainAxisAlignment.spaceBetween,
                              children: [
                                TextWidget().text12W700("512 Mb",
                                    clr: AppColor.portoflioCardTextColor),
                                Gap(
                                  7.w,
                                ),
                                Image.asset(
                                  AppImages.donwloadIcon,
                                  height: 20.sp,
                                ),
                              ],
                            ),
                          ),
                        ],
                      ),
                    ),
                  );
                },
              ),
            )
          ],
        ),
      ),
    );
  }
}
