import 'package:flutter/material.dart';

class TransactionItem extends StatelessWidget {

  final String fullName;
  final String status;
  final String amount;
  final bool received;

  TransactionItem({required this.fullName, required this.status, required this.amount, required this.received});

  @override
  Widget build(BuildContext context) {
    return Container(
      margin: EdgeInsets.symmetric(vertical: 8),
      child: Row(
          children: [

            Container(
              width: 16,
              height: 50,
              //margin: EdgeInsets.only(right: 16),
              // child: Icon(
              //   Icons.memory
              // ),
            ),

            Expanded(
              child: Column(
                crossAxisAlignment: CrossAxisAlignment.start,
                children: [

                  Text(
                    fullName,
                    style: TextStyle(
                      //color: kPrimaryColor,
                      fontSize: 16,
                      fontWeight: FontWeight.bold,
                    ),
                  ),

                  Text(
                    status,
                    style: TextStyle(
                      //color: kGreyColor,
                      fontSize: 12,
                      fontWeight: FontWeight.w500,
                    ),
                  ),

                ],
              ),
            ),

            Text(
              (received ? "+" : "-") + r" $ " + amount + " KZT",
              style: TextStyle(
                color: received ? Colors.green : Colors.red,
                fontSize: 16,
                fontWeight: FontWeight.bold,
              ),
            ),

          ]
      ),
    );
  }
}