import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:flutter/material.dart';

import '../../theme/colors.dart';

class CategoryButtons extends StatelessWidget {
  CategoryButtons({super.key, required this.label, required this.selected, required this.onTap});

  late String label;
  late bool selected;
  late Function onTap;

  @override
  Widget build(BuildContext context) {
    return Expanded(
      child: InkWell(
        onTap: () {
          onTap();
        },
        child: Container(
          height: 64.h,
          decoration: BoxDecoration(
            color: selected ? AppColors.mainPurple : Colors.grey.shade200,
            borderRadius: BorderRadius.circular(16),
          ),
          child: Center(
            child: label.toText13(color: selected ? Colors.white : Colors.black, isBold: true),
          ),
        ),
      ),
    );
  }
}
