//
//  MainScreenInterfaces.swift
//  Awesome Counter
//
//  Created by John Guerrero on 2/12/20.
//  Copyright (c) 2020 ___ORGANIZATIONNAME___. All rights reserved.
//
//  This file was generated by the 🐍 VIPER generator
//

import UIKit

enum MainScreenNavigationOption {
    case addItem(_ onAddedItemClosure: (() -> Void))
    case activityView(_ countersDescription: [String])
    case deleteActionSheet(_ selectedItemsCount: Int, _ completion: ((Bool) -> Void))
    case deleteErrorAlert(_ counterTitle: String)
    case incrementErrorAlert(_ counter: Counter?)
    case decrementErrorAlert(_ counter: Counter?)
}

protocol MainScreenWireframeInterface: WireframeInterface {
    func navigate(to option: MainScreenNavigationOption)
}

protocol MainScreenViewInterface: ViewInterface {
    func startLoading()
    func finishLoading()
    func setEmptyView()
    func setErrorView()
    func setContentView()
    func setItemManager(_ itemManager: CounterItemManager)
    func endTableViewRefreshing()
    func reloadTableView()
    func updateCountersInformation()
}

protocol MainScreenPresenterInterface: PresenterInterface {
    func viewDidLoad()
    func viewDidAppear()
    func presentAddItemModule()
    func loadCounters()
    func refreshCounters()
    func deleteCounters(byIds counterIds: [String])
    func shareCounters(byIds counterIds: [String])
}

protocol MainScreenInteractorInterface: InteractorInterface {
    func getCounters(completion: @escaping CounterService.CountersDataResponse)
    func incrementCounter(byId id: String, completion: @escaping CounterService.CountersDataResponse)
    func decrementCounter(byId id: String, completion: @escaping CounterService.CountersDataResponse)
    func addCounter(title: String, completion: @escaping CounterService.CountersDataResponse)
    func deleteCounter(byId id: String, completion: @escaping CounterService.CountersDataResponse)
}
