import 'package:ambito/src/extensions/extensions.dart';
import 'package:flutter/material.dart';

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

class DeleteButton extends StatelessWidget {
  final VoidCallback onPressed;

  const DeleteButton({super.key, required this.onPressed});

  @override
  Widget build(BuildContext context) {
    final AmbitoTheme theme = getTheme(context);
    return WidgetOutlineButton(
      onPressed: onPressed,
      title: context.translate('page.general.buttons.delete'),
      backgroundColor: theme.currentColorScheme.error,
      foregroundColor: theme.currentColorScheme.onError,
      borderColor: theme.currentColorScheme.error,
    );
  }
}
