import 'package:flutter/material.dart';
import 'package:sendtrain/database/database.dart';
import 'package:sendtrain/extensions/string_extensions.dart';

class ActivityViewTypes extends StatelessWidget {
  const ActivityViewTypes({super.key, required this.types});

  final List<ActivityType> types;

  @override
  Widget build(BuildContext context) {
    return SizedBox(
        height: 40,
        child: ListView.builder(
          shrinkWrap: true,
          scrollDirection: Axis.horizontal,
          padding: const EdgeInsets.only(right: 10),
          itemCount: types.length,
          itemBuilder: (BuildContext context, int index) {
            return ActionChip(
              visualDensity: VisualDensity.compact,
              avatar: const Icon(Icons.fitness_center_rounded),
              label: Text(maxLines: 1, types[index].name.toTitleCase()),
              tooltip: "Activity Type",
              onPressed: () {},
            );
          },
        ));
  }
}
