import 'package:car_provider_app/theme/colors.dart';
import 'package:car_provider_app/utils/navigator.dart';
import 'package:car_provider_app/utils/utils.dart';
import 'package:car_provider_app/widgets/button/show_fill_button.dart';
import 'package:car_provider_app/extensions/int_extensions.dart';
import 'package:car_provider_app/extensions/string_extensions.dart';
import 'package:flutter/material.dart';

class MessageDialog extends StatelessWidget {
  String? title, buttonTitle;
  VoidCallback? onClick;

  MessageDialog({this.title, this.buttonTitle, this.onClick});

  @override
  Widget build(BuildContext context) {
    return Container(
      color: Colors.white,
      padding: EdgeInsets.all(30),
      child: Column(
        mainAxisSize: MainAxisSize.min,
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          (title ?? "message").toText24(),
          40.height,
          ShowFillButton(
            title: buttonTitle ?? "Continue",
            maxWidth: double.infinity,
            onPressed: () {
              onClick!();
            },
          )
        ],
      ),
    );
  }
}
