import 'package:flutter/material.dart';

import 'package:pweb/pages/payout_page/send/widgets/section/title.dart';
import 'package:pweb/models/state/visibility.dart';
import 'package:pweb/utils/dimensions.dart';


class PaymentInfoHeader extends StatelessWidget {
  final AppDimensions dimensions;
  final String title;
  final VisibilityState visibility;

  const PaymentInfoHeader({
    super.key,
    required this.dimensions,
    required this.title,
    required this.visibility,
  });

  @override
  Widget build(BuildContext context) {
    if (visibility != VisibilityState.visible) {
      return const SizedBox.shrink();
    }

    return Column(
      crossAxisAlignment: CrossAxisAlignment.start,
      children: [
        SectionTitle(title),
        SizedBox(height: dimensions.paddingSmall),
      ],
    );
  }
}
