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

/// A section displaying the job description for the shift.
class ShiftDescriptionSection extends StatelessWidget {
  /// The description text.
  final String description;
  
  /// Localization string for description section title.
  final String descriptionLabel;

  /// Creates a [ShiftDescriptionSection].
  const ShiftDescriptionSection({
    super.key,
    required this.description,
    required this.descriptionLabel,
  });

  @override
  Widget build(BuildContext context) {
    if (description.isEmpty) return const SizedBox.shrink();
    
    return Padding(
      padding: const EdgeInsets.all(UiConstants.space5),
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          Text(
            descriptionLabel,
            style: UiTypography.titleUppercase4b.textSecondary,
          ),
          const SizedBox(height: UiConstants.space2),
          Text(
            description,
            style: UiTypography.body2r.textSecondary,
          ),
        ],
      ),
    );
  }
}
