import 'package:flutter/material.dart';
import 'package:sizer/sizer.dart';

import '../../../core/app_export.dart';

class BusStopMarkerWidget extends StatelessWidget {
  final Map<String, dynamic> busStop;
  final bool isSelected;
  final VoidCallback onTap;

  const BusStopMarkerWidget({
    super.key,
    required this.busStop,
    required this.isSelected,
    required this.onTap,
  });

  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      onTap: onTap,
      child: AnimatedContainer(
        duration: const Duration(milliseconds: 200),
        width: isSelected ? 48.w : 40.w,
        height: isSelected ? 48.w : 40.w,
        decoration: BoxDecoration(
          color: isSelected
              ? AppTheme.accentYellow
              : AppTheme.accentYellow.withValues(alpha: 0.9),
          shape: BoxShape.circle,
          border: Border.all(
            color: AppTheme.primaryBlack,
            width: isSelected ? 3 : 2,
          ),
          boxShadow: [
            BoxShadow(
              color: AppTheme.primaryBlack.withValues(alpha: 0.3),
              blurRadius: isSelected ? 8 : 4,
              offset: const Offset(0, 2),
            ),
          ],
        ),
        child: Center(
          child: CustomIconWidget(
            iconName: 'directions_bus',
            color: AppTheme.primaryBlack,
            size: isSelected ? 24 : 20,
          ),
        ),
      ),
    );
  }
}
