import 'package:flutter/material.dart';
import 'package:line_icons/line_icons.dart';
import 'package:rkm/config/color_palette.dart';
import 'package:rkm/config/const_variable.dart';
import 'package:rkm/widgets/alert_dialog_default.dart';
import 'package:rkm/widgets/text_default.dart';

class ItemCitizen extends StatelessWidget {

  String name;
  String date;
  String mother;
  String numberCNS;
  String numberMedicalRecord;
  var onTap;

  ItemCitizen({
    required this.name,
    required this.date,
    required this.mother,
    required this.numberCNS,
    required this.numberMedicalRecord,
    required this.onTap
});

  @override
  Widget build(BuildContext context) {
    return Container(
      margin: ConstVariable().marginHightInput,
      child: Card(
        margin: ConstVariable().marginHightInput,
        color: ColorPalette.white,
        child: ListTile(
          title: TextDefault(text: name,fontWeigth: FontWeight.bold,color: Colors.black54,fontSize: 18,),
          subtitle: TextDefault(text: '$numberCNS - $numberMedicalRecord - $date - $mother',fontSize: 13,color: Colors.black54),
          trailing: IconButton(
            icon: Icon(LineIcons.clipboard,size: 35,),
            onPressed: ()=>AlertDialogDefault().alertSelect(context),
          ),
          onTap: onTap,
        ),
      ),
    );
  }
}
