
import 'package:hl_lieferservice/model/delivery.dart';
import 'package:image_picker/image_picker.dart';

abstract class NoteEvent {}

class LoadNote extends NoteEvent {
  LoadNote({required this.delivery});

  final Delivery delivery;
}

class ResetNotes extends NoteEvent {}

class AddNote extends NoteEvent {
  AddNote({required this.note, required this.deliveryId});

  final String note;
  final String deliveryId;
}

class AddNoteOffline extends NoteEvent {
  AddNoteOffline({required this.note, required this.deliveryId, required this.noteId});

  final String note;
  final String noteId;
  final String deliveryId;
}

class RemoveNote extends NoteEvent {
  RemoveNote({required this.noteId});

  final String noteId;
}

class EditNote extends NoteEvent {
  EditNote({required this.content, required this.noteId});

  final String noteId;
  final String content;
}

class AddImageNote extends NoteEvent {
  AddImageNote({required this.file, required this.deliveryId});

  final XFile file;
  final String deliveryId;
}

class RemoveImageNote extends NoteEvent {
  RemoveImageNote({required this.objectId, required this.deliveryId});

  final String objectId;
  final String deliveryId;
}

class NotesUpdated extends NoteEvent {
  final List<Note> notes;

  NotesUpdated({required this.notes});
}

class ImageUpdated extends NoteEvent {
  final List<ImageNote> images;

  ImageUpdated({required this.images});
}

class DataUpdated extends NoteEvent {
  final List<ImageNote> images;
  final List<Note> notes;
  final List<NoteTemplate> templates;

  DataUpdated({required this.images, required this.notes, required this.templates});
}