import 'package:flutter_bounceable/flutter_bounceable.dart';

import '../../../../../../food_delivery_client.dart';

class WCategoriesHeaderItem extends StatelessWidget {
  const WCategoriesHeaderItem({
    super.key,
    required this.text,
    required this.imageUrl,
    required this.onTap,
  });

  final String text;
  final String imageUrl;
  final VoidCallback onTap;

  @override
  Widget build(BuildContext context) {
    return Expanded(
      child: InkWell(
        onTap: onTap,
        borderRadius: AppUtils.kBorderRadius10,
        child: Ink(
          height: 88,
          decoration: BoxDecoration(
            borderRadius: AppUtils.kBorderRadius10,
            color: AppColors.cE6E6E6.newWithOpacity(.4),
          ),
          child: Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            children: [
              Expanded(
                flex: 2,
                child: Align(
                  alignment: AlignmentGeometry.topRight,
                  child: Image.asset(imageUrl).paddingOnly(top: 5, right: 5),
                ),
              ),
              Expanded(
                child: Text(
                  text,
                  style: AppTextStyles.size18Medium,
                ).paddingOnly(left: 12, bottom: 6),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
