import 'package:flutter/material.dart';
import 'package:mc_common_app/classes/consts.dart';
import 'package:mc_common_app/extensions/string_extensions.dart';
import 'package:mc_common_app/theme/colors.dart';

class EmptyWidget extends StatelessWidget {
  final String text;
  final bool isWrappedColumn;
  final Widget? spacerWidget;

  const EmptyWidget({Key? key, required this.text, this.isWrappedColumn = true, this.spacerWidget}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    if (isWrappedColumn) {
      return Column(
        mainAxisAlignment: MainAxisAlignment.center,
        children: [
          spacerWidget ?? const SizedBox(),
          text.toText(fontSize: 16, color: MyColors.lightTextColor, fontWeight: MyFonts.Medium),
        ],
      );
    }

    return Center(child: text.toText(fontSize: 16, color: MyColors.lightTextColor, fontWeight: MyFonts.Medium));
  }
}
