import 'package:ambito/src/widgets/buttons/cancel_button.dart';
import 'package:ambito/src/widgets/buttons/save_button.dart';
import 'package:flutter/material.dart';

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

class SaveButtonsGroup extends StatelessWidget {
  final VoidCallback onPressed;

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

  @override
  Widget build(BuildContext context) {
    final AmbitoTheme theme = getTheme(context);

    return Align(
      alignment: Alignment.centerRight,
      child: Row(
        mainAxisAlignment: MainAxisAlignment.end,
        children: [
          const CancelButton(),
          theme.horizontalSpacer,
          SaveButton(onPressed: onPressed),
        ],
      ),
    );
  }
}
