   func onBookmarkDeleted(_: MWMMarkID) {
     reloadData()
   }
-  
+
   func onBookmarksCategoryFilePrepared(_ status: BookmarksShareStatus) {
     switch status {
     case .success:

  }

  func areAllCategoriesHidden() -> Bool {
    var result = true;
    categories.forEach { if $0.isVisible { result = false } }
    return result
  }

  }

  func onRestoringRequest(_ result: MWMRestoringRequestResult, deviceName name: String?, backupDate date: Date?) {
    MWMAlertViewController.activeAlert().closeAlert {
      switch result {
      case .noInternet: MWMAlertViewController.activeAlert().presentNoConnectionAlert()

      case .backupExists:
        guard let date = date else {
          assertionFailure()
          return
        }

        let formatter = DateFormatter()
        formatter.dateStyle = .short
        formatter.timeStyle = .none
        let deviceName = name ?? ""
        let message = String(coreFormat: L("bookmarks_restore_message"),
                             arguments: [formatter.string(from: date), deviceName])

        let cancelAction = { [weak self] in self?.cancelRestoring() } as MWMVoidBlock
        MWMAlertViewController.activeAlert().presentRestoreBookmarkAlert(withMessage: message,
                                                                         rightButtonAction: { [weak self] in
                                                                          MWMAlertViewController.activeAlert().presentSpinnerAlert(withTitle: L("bookmarks_restore_process"),
                                                                                                                                   cancel: cancelAction)
                                                                          self?.applyRestoring()
          }, leftButtonAction: cancelAction)

      case .noBackup:
        Statistics.logEvent(kStatBookmarksRestoreProposalError,
                            withParameters: [kStatType: kStatNoBackup, kStatError: ""])
        MWMAlertViewController.activeAlert().presentDefaultAlert(withTitle: L("bookmarks_restore_empty_title"),
                                                                 message: L("bookmarks_restore_empty_message"),
                                                                 rightButtonTitle: L("ok"),
                                                                 leftButtonTitle: nil,
                                                                 rightButtonAction: nil)

      case .notEnoughDiskSpace:
        Statistics.logEvent(kStatBookmarksRestoreProposalError,
                            withParameters: [kStatType: kStatDisk, kStatError: "Not enough disk space"])
        MWMAlertViewController.activeAlert().presentNotEnoughSpaceAlert()
      case .requestError:
        assertionFailure()
      }
    }
  }
