import 'dart:developer';

import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:gap/gap.dart';

import '../../../../../core/styles/app_color.dart';
import '../../../../../shared/components/text_widget.dart';
import 'wallet_list_section.dart';

class YieldDetailSection extends StatelessWidget {
  final String type;
  const YieldDetailSection({super.key, required this.type});

  @override
  Widget build(BuildContext context) {
    log(type.toString());
    return Padding(
      padding: const EdgeInsets.fromLTRB(20.0, 30, 20, 10),
      child: Column(
        mainAxisSize: MainAxisSize.min,
        children: [
          Column(
            crossAxisAlignment: CrossAxisAlignment.center,
            children: [
              getIcon(type),
              Gap(16.h),
              TextWidget().text14W600(type, clr: AppColor.otpTextColor),
              Gap(4.h),
              TextWidget()
                  .text17W700("Name of investment", clr: AppColor.otpTextColor),
              Gap(4.h),
              TextWidget()
                  .text11W500('10/04/2024 22:04', clr: AppColor.hintTextColor),
              Gap(16.h),
              TextWidget()
                  .text20W900('+ SAR 100,000', clr: AppColor.otpTextColor),
              Gap(2.h),
              type == "Refund"
                  ? const SizedBox()
                  : TextWidget()
                      .text12W500('+  \$100.00', clr: AppColor.textLabelColor),
            ],
          ),
        ],
      ),
    );
  }
}
