import 'package:flutter/material.dart';

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

class OrderStatusTile extends StatelessWidget {
  final String label;
  final bool isSelected;
  final void Function(bool)? onSelected;
  const OrderStatusTile({
    super.key,
    required this.label,
    this.isSelected = false,
    this.onSelected,
  });

  @override
  Widget build(BuildContext context) {
    return FilterChip(
      label: Text(
        label,
        style: TextStyle(
          color: isSelected ? Colors.white : AppColor.primary,
          fontWeight: isSelected ? FontWeight.w600 : FontWeight.normal,
        ),
      ),
      selected: isSelected,
      onSelected: onSelected,
      backgroundColor: Colors.white,
      selectedColor: AppColor.primary,
      checkmarkColor: Colors.white,
      side: BorderSide(
        color: isSelected ? AppColor.primary : Colors.grey.shade300,
        width: 1,
      ),
      shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)),
      padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
    );
  }
}
