import 'package:flutter/material.dart';
import 'package:syncrow_web/utils/color_manager.dart';
import 'package:syncrow_web/utils/extension/build_context_x.dart';

class OccupancyHeatMapDays extends StatelessWidget {
  const OccupancyHeatMapDays({
    required this.cellSize,
    this.textColor = ColorsManager.blackColor,
    super.key,
  });

  final double cellSize;
  final Color textColor;

  static const _weekDayLabels = [
    'Monday',
    'Tuesday',
    'Wednesday',
    'Thursday',
    'Friday',
    'Saturday',
    'Sunday',
  ];

  @override
  Widget build(BuildContext context) {
    return Column(
      crossAxisAlignment: CrossAxisAlignment.start,
      children: List.generate(7, (i) {
        final dayLabel = _weekDayLabels[i];
        return Container(
          height: cellSize,
          alignment: AlignmentDirectional.centerStart,
          margin: const EdgeInsetsDirectional.all(0.5).add(
            const EdgeInsetsDirectional.only(end: 4),
          ),
          padding: const EdgeInsets.only(right: 6),
          child: Text(
            dayLabel,
            textAlign: TextAlign.start,
            style: context.textTheme.bodySmall?.copyWith(
              color: textColor,
              fontSize: 8,
              fontWeight: FontWeight.w500,
            ),
          ),
        );
      }),
    );
  }
}
