import 'package:flutter/material.dart';
import '../../../core/theme/widgets/halo_popup.dart';

/// Stage 7 — first of two confirm popups before ending the session. Surface
/// the soft "balik" exit prominently because the most common path here is the
/// user mis-tapping "akhiri sesi" while still wanting to continue.
class ConfirmEndStep1 {
  const ConfirmEndStep1._();

  static Future<void> show(
    BuildContext context, {
    required VoidCallback onConfirm,
  }) {
    return HaloPopup.show<void>(
      context,
      title: 'yakin mau akhiri sesi?',
      body: 'sesi akan ditutup dan kamu balik ke home',
      icon: const Text('🤔', style: TextStyle(fontSize: 40)),
      primary: HaloPopupAction(label: 'lanjut akhiri', onPressed: onConfirm),
      secondary: HaloPopupAction(
        label: 'gak jadi, balik',
        onPressed: () {},
      ),
    );
  }
}
