import 'package:flutter/material.dart';

/// Top tab strip for the Stats screen. Hosted inside an [AppBar] `bottom:`
/// slot and driven by an ambient [DefaultTabController].
class StatsFilterBar extends StatelessWidget implements PreferredSizeWidget {
  const StatsFilterBar({super.key});

  static const double _height = 48;

  @override
  Size get preferredSize => const Size.fromHeight(_height);

  @override
  Widget build(BuildContext context) {
    final scheme = Theme.of(context).colorScheme;
    return TabBar(
      isScrollable: false,
      labelColor: scheme.primary,
      unselectedLabelColor: scheme.onSurfaceVariant,
      indicatorColor: scheme.primary,
      indicatorSize: TabBarIndicatorSize.label,
      labelStyle: const TextStyle(fontWeight: FontWeight.w700),
      tabs: const [
        Tab(text: 'Standings'),
        Tab(text: 'Top Scorers'),
        Tab(text: 'Top Assists'),
      ],
    );
  }
}
