import 'package:flutter/material.dart';

import '../../../../common/theme/theme.dart';

class PurchaseStatusChip extends StatelessWidget {
  final bool isSelected;
  final String text;
  final Function(bool) onSelected;
  const PurchaseStatusChip({
    super.key,
    required this.isSelected,
    required this.text,
    required this.onSelected,
  });

  @override
  Widget build(BuildContext context) {
    return Padding(
      padding: const EdgeInsets.only(right: 8),
      child: FilterChip(
        selected: isSelected,
        label: Text(
          text,
          style: AppStyle.sm.copyWith(
            color: isSelected ? AppColor.textWhite : AppColor.textSecondary,
          ),
        ),
        backgroundColor: AppColor.backgroundLight,
        selectedColor: AppColor.primary,
        onSelected: onSelected,
      ),
    );
  }
}
