import 'package:flutter/material.dart';
import 'package:tour_travel_agr/resource/assets.dart';
import 'package:tour_travel_agr/resource/colors.dart';
import 'package:tour_travel_agr/resource/font.dart';
import 'package:tour_travel_agr/resource/size.dart';
import 'package:tour_travel_agr/resource/style.dart';

class ListTransaction extends StatelessWidget {
  const ListTransaction({
    super.key,
    required this.date,
    required this.title,
    required this.subtitle,
  });

  final String date;
  final String title;
  final String subtitle;

  @override
  Widget build(BuildContext context) {
    return Container(
      margin: const EdgeInsets.only(
        bottom: 12,
      ),
      padding: EdgeInsets.all(
        AppPadding.p12,
      ),
      height: 102,
      width: double.infinity,
      decoration: BoxDecoration(
        borderRadius: BorderRadius.circular(
          12,
        ),
        border: Border.all(
          width: 0.5,
          color: Colors.grey.withOpacity(
            0.25,
          ),
        ),
        color: Colors.white,
        boxShadow: [
          BoxShadow(
            color: Colors.grey.withOpacity(0.3),
            blurRadius: 2,
            offset: const Offset(5, 5),
          ),
        ],
      ),
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          Row(
            children: [
              const Spacer(),
              Text(
                date,
                style: getRegularStyle(
                  color: ColorManager.grey,
                  fontFamily: FontConstants.openSans,
                  fontSize: FontSize.s12,
                ),
              )
            ],
          ),
          Row(
            crossAxisAlignment: CrossAxisAlignment.center,
            children: [
              Container(
                width: 40,
                height: 40,
                decoration: BoxDecoration(
                  borderRadius: BorderRadius.circular(
                    100,
                  ),
                  color: ColorManager.pink,
                ),
                child: Center(
                  child: Image(
                    width: 20,
                    height: 20,
                    image: AssetImage(
                      Assets.transactionIcon,
                    ),
                  ),
                ),
              ),
              Container(
                margin: EdgeInsets.only(
                  left: AppMargin.m16,
                ),
                child: Column(
                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
                  crossAxisAlignment: CrossAxisAlignment.start,
                  children: [
                    Text(
                      title,
                      style: getBoldStyle(
                        color: Colors.black,
                        fontFamily: FontConstants.mulish,
                        fontSize: 18,
                      ),
                    ),
                    Text(
                      subtitle,
                      style: getSemiBoldStyle(
                        color: ColorManager.primary,
                        fontFamily: FontConstants.openSans,
                      ),
                    ),
                  ],
                ),
              )
            ],
          )
        ],
      ),
    );
  }
}
