import 'package:flutter/material.dart';
import 'package:tacban/assets/theme/colors.dart';

class CardInfoCardV2Widget extends StatelessWidget {
  final String svg;
  final String title;
  final GestureTapCallback? onTap;
  const CardInfoCardV2Widget({super.key, required this.onTap, required this.svg, required this.title});

  @override
  Widget build(BuildContext context) {
    Radius radius = const Radius.circular(50);
    return Expanded(
      child: InkWell(
        onTap: onTap,
        radius: 0,
        child: Container(
          height: 200,
          decoration: BoxDecoration(
            color: Colors.white,
            borderRadius: BorderRadius.circular(18),
            boxShadow: [
              BoxShadow(
                color: AppColorLight.primaryColor,
                spreadRadius: 0,
                blurRadius: 1,
                blurStyle: BlurStyle.outer
              )
            ]
          ),
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              ClipRRect(
                borderRadius: BorderRadius.only(
                  topLeft: radius,
                  bottomLeft: radius,
                  bottomRight: radius,
                  topRight: radius
                ),
                child: Image.asset(
                  svg,
                  width: 100,
                  fit: BoxFit.fill
                )
              ),
              const SizedBox(height: 10),
              Text(title,
                style: Theme.of(context).textTheme.bodySmall?.copyWith(
                  fontWeight: FontWeight.bold,
                  color: AppColorLight.primaryColor,
                  fontSize: 15
                ),
              ),
              const SizedBox(height: 5),
              Text('Maurício P. Batistella Pasini',
                style: Theme.of(context).textTheme.bodySmall?.copyWith(
                  fontWeight: FontWeight.bold,
                  fontSize: 11
                ),
              )
            ],
          ),
        ),
      )
    );
  }
}