import 'package:flutter/material.dart';
import 'package:rkm_educa_app/componentes/text_custom.dart';
import 'package:rkm_educa_app/utils/dimensoes.dart';
import '../utils/cores.dart';

class ItemAvisos extends StatelessWidget {

  String data;
  String aviso;
  bool naovisto;
  var onTap;

  ItemAvisos({
    required this.data,
    required this.aviso,
    required this.naovisto,
    required this.onTap
});

  @override
  Widget build(BuildContext context) {

    return GestureDetector(
      onTap: onTap,
      child: Container(
        color: PaletaCores.branco,
        padding: const EdgeInsets.symmetric(horizontal: 20.0,vertical: 5),
        child: Column(
          children: [
            Row(
              crossAxisAlignment: CrossAxisAlignment.center,
              children: [
                Container(
                  width: Dimensoes.width*0.8,
                  height: 65,
                  padding: const EdgeInsets.symmetric(horizontal: 20.0),
                  child: Column(
                    children: [
                      Padding(
                        padding: EdgeInsets.symmetric(vertical: 5),
                        child: Row(
                          children: [
                            TextCustom(text: 'Data',size: 14.0,fontWeight: FontWeight.bold),
                            SizedBox(width: 10,),
                            TextCustom(text: data,size: 14.0,fontWeight: naovisto?FontWeight.bold:FontWeight.normal,color: naovisto?PaletaCores.cinzaEscuro:PaletaCores.cinzaClaro,),
                          ],
                        ),
                      ),
                      Padding(
                        padding: EdgeInsets.symmetric(vertical: 5),
                        child: Row(
                          children: [
                            TextCustom(text: 'Aviso',size: 14.0,fontWeight: FontWeight.bold),
                            SizedBox(width: 10,),
                            TextCustom(text: aviso,fontWeight: naovisto?FontWeight.bold:FontWeight.normal,color: naovisto?PaletaCores.cinzaEscuro:PaletaCores.cinzaClaro,),
                          ],
                        ),
                      ),
                    ],
                  ),
                ),
                naovisto?CircleAvatar(backgroundColor: PaletaCores.notificacao,radius: 6,):Container()
              ],
            ),
            Container(width: double.infinity,height: 2,color: PaletaCores.divider,)
          ],
        ),
      ),
    );
  }
}
