import 'package:flutter/material.dart';

import '../../../utils/extensions/constants.dart';
import '../graph_controller.dart';


class MyListTileCard extends StatelessWidget {
  const MyListTileCard({
    super.key,
    required this.graphCtrl,
    required this.index,
  });

  final GraphController graphCtrl;
  final int index;

  @override
  Widget build(BuildContext context) {
    return Card(
      shadowColor: Colors.grey.shade200,
      child: ListTile(
        title: Text(
          '${graphCtrl.sumListData[index].szMonth}',
          style: kTextStyle,
        ),
        subtitle: Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: [
            Text(
              'Monatsausgaben: ${graphCtrl.sumListData[index].szSumme} €',
              style: kTextStyleSub,
            ),
            Text(
              'Monatsverbrauch: ${graphCtrl.sumListData[index].szVerbrauch} L',
              style: kTextStyleSub,
            ),
            Text(
              'Tankungen: ${graphCtrl.sumListData[index].mnTankungen}',
              style: kTextStyleSub,
            ),
          ],
        ),
      ),
    );
  }
}
