import 'package:flutter/material.dart';

import 'package:pweb/pages/login/login.dart';
import 'package:pweb/pages/login/signup.dart';
import 'package:pweb/widgets/hspacer.dart';


class ButtonsRow extends StatelessWidget {
  final Future<String?> Function() login;
  final VoidCallback onSignUp;
  final bool isEnabled;

  const ButtonsRow({
    super.key,
    required this.login,
    required this.onSignUp,
    required this.isEnabled,
  });

  @override
  Widget build(BuildContext context) => Row(
    children: [
      LoginButton(onPressed: isEnabled ? () => login() : null),
      SignupButton(onPressed: onSignUp),
      HSpacer(multiplier: 0.25),
    ],
  );
}