import 'package:flutter/material.dart';
import 'package:syncrow_web/pages/common/buttons/default_button.dart';
import 'package:syncrow_web/utils/color_manager.dart';
import 'package:syncrow_web/utils/extension/build_context_x.dart';

class ScheduleModeButtons extends StatelessWidget {
  final VoidCallback onSave;

  const ScheduleModeButtons({
    super.key,
    required this.onSave,
  });

  @override
  Widget build(BuildContext context) {
    return Row(
      mainAxisAlignment: MainAxisAlignment.center,
      mainAxisSize: MainAxisSize.max,
      children: [
        Expanded(
          child: DefaultButton(
            height: 40,
            onPressed: () {
              Navigator.pop(context);
            },
            backgroundColor: ColorsManager.boxColor,
            child: Text(
              'Cancel',
              style: context.textTheme.bodyMedium,
            ),
          ),
        ),
        const SizedBox(width: 20),
        Expanded(
          child: DefaultButton(
            height: 40,
            onPressed: onSave,
            backgroundColor: ColorsManager.primaryColor,
            child: const Text('Save'),
          ),
        ),
      ],
    );
  }
}
