import 'package:flutter/material.dart';

import '../../packages/ambito_theme/ambito_theme.dart';

class WidgetOutlineButton extends StatelessWidget {
  const WidgetOutlineButton({
    super.key,
    required this.onPressed,
    required this.title,
    required this.backgroundColor,
    required this.foregroundColor,
    required this.borderColor,
  });

  final VoidCallback onPressed;
  final String title;
  final Color backgroundColor;
  final Color foregroundColor;
  final Color borderColor;

  @override
  Widget build(BuildContext context) {
    final AmbitoTheme theme = getTheme(context);
    return OutlinedButton(
      onHover: (hover) {},
      style: OutlinedButton.styleFrom(
        minimumSize: const Size(200, 50),
        shape: RoundedRectangleBorder(
          side: BorderSide(
            color: borderColor,
            width: 1,
            style: BorderStyle.solid,
          ),
          borderRadius: BorderRadius.circular(
            10,
          ),
        ),
        backgroundColor: backgroundColor,
        foregroundColor: foregroundColor,
        side: BorderSide(
          width: 1,
          color: borderColor,
        ),
      ),
      onPressed: onPressed,
      child: Text(
        title,
        style: theme.bodyMedium,
      ),
    );
  }
}
