import 'dart:convert';

class MarineManualPreDepartureChecklistData {
  String? reporterName;
  int? reporterUserId;
  String? submissionDate;

  // Key: Item description, Value: true if 'Yes', false if 'No'
  Map<String, bool> checklistItems = {};

  // Key: Item description, Value: Remarks text
  Map<String, String> remarks = {};

  MarineManualPreDepartureChecklistData();

  Map<String, dynamic> toApiFormData() {
    return {
      'reporter_user_id': reporterUserId.toString(),
      'submission_date': submissionDate,
      'checklist_items': jsonEncode(checklistItems),
      'remarks': jsonEncode(remarks),
    };
  }
}