 import MessageUI
 import Photos
 
+public enum ReportingMode : String {
+    case disabled
+    case email
+}
+
 public protocol BugReporterDelegate {
     
+    // Report life cycle
+    func userDidStartAReport(_ report : Report)
+    func userDidCancelAReport(_ report : Report)
+    func userDidSendAReport(_ report : Report, using mode: ReportingMode)
+    func userDidSaveAReport(_ report : Report, using mode: ReportingMode)
+    
+    func appendMoreImages(to report: Report) -> [UIImage]?
 }
 
 public class BugReporter: NSObject, MFMailComposeViewControllerDelegate {
-    
-    public enum ReportingMode : String {
-        case disabled
-        case email
-    }
     
     //MARK: Shared Instance
     static let shared : BugReporter = {

    }
    
    public func mailComposeController(_ controller: MFMailComposeViewController, didFinishWith result: MFMailComposeResult, error: Error?) {
        if debug {
            switch result {
            case .sent:
                debugPrint("Report sent")
                break
            case .saved:
                debugPrint("Report saved")
                break
            default:
                debugPrint("Report not sent neither saved")
                break
            }
        }
        controller.dismiss(animated: true, completion: nil)
    }
    
}

        })
    }
    
    public func debug(_ enabled : Bool) -> BugReporter {
        self.debugEnabled = enabled
        return BugReporter.shared
    }
    
    private func processReport(from notification : Notification) {
        if debugEnabled {
            debugPrint("didDectectAnScreenshotTaken: \(notification)")
            debugPrint("reporting mode: \(self.reportingMode.rawValue)")
        }
        
        guard currentReport == nil else {
            if debugEnabled {
                debugPrint("Sorry, Bug Report cannot handle another bug report (yet) while there is a report in progress.")
            }
            return
        }
        
        guard delegate != nil else {
            if debugEnabled {
                debugPrint("Bug Report delegate is not set. report will not be handled")
            }
            return
        }
        
        guard let topVC = topViewController() else {
            if self.debugEnabled {
                debugPrint("Bug Report did not find a View Controller to present the report")
            }
            return
