type FilterChipsProps = {
  chips: string[];
  onClear?: () => void;
  clearLabel?: string;
};

export default function FilterChips({ chips, onClear, clearLabel = "Clear filters" }: FilterChipsProps) {
  return (
    <div className="d-flex flex-wrap gap-2 align-items-center">
      {chips.map((chip) => (
        <span key={chip} className="badge text-bg-light">{chip}</span>
      ))}
      {onClear ? (
        <button type="button" className="btn btn-sm btn-outline-secondary" onClick={onClear}>
          {clearLabel}
        </button>
      ) : null}
    </div>
  );
}
