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

/// Stage 7 — second confirm popup. Customer has already chosen to end; this
/// step nudges (not forces) them to leave a closing message, with `lewati saja`
/// as the bypass into the close-session API directly.
class ConfirmEndStep2 {
  const ConfirmEndStep2._();

  static Future<void> show(
    BuildContext context, {
    required VoidCallback onWriteMessage,
    required VoidCallback onSkip,
  }) {
    return HaloPopup.show<void>(
      context,
      title: 'mau tinggalin pesan penutup?',
      body: 'kamu bisa tulis pesan terakhir buat bestie sebelum sesi ditutup',
      icon: const Text('💌', style: TextStyle(fontSize: 40)),
      primary: HaloPopupAction(
        label: 'tulis pesan penutup',
        onPressed: onWriteMessage,
      ),
      secondary: HaloPopupAction(label: 'lewati saja', onPressed: onSkip),
    );
  }
}
