2023-04-11 22:14:40 +00:00
|
|
|
//
|
|
|
|
// LocationsListViewModeling.swift
|
|
|
|
// Locations
|
|
|
|
//
|
|
|
|
// Created by Javier Cicchelli on 11/04/2023.
|
|
|
|
// Copyright © 2023 Röck+Cöde. All rights reserved.
|
|
|
|
//
|
|
|
|
|
2023-04-12 16:58:27 +00:00
|
|
|
import Combine
|
|
|
|
import Foundation
|
|
|
|
import Persistence
|
|
|
|
|
2023-04-11 22:14:40 +00:00
|
|
|
protocol LocationsListViewModeling: AnyObject {
|
|
|
|
|
|
|
|
// MARK: Properties
|
|
|
|
|
|
|
|
var coordinator: LocationsListCoordination? { get set }
|
|
|
|
|
2023-04-12 21:25:08 +00:00
|
|
|
var locationsDidChangePublisher: PassthroughSubject<[Change], Never> { get }
|
2023-04-12 23:07:42 +00:00
|
|
|
var numberOfLocationSections: Int { get }
|
2023-04-12 16:58:27 +00:00
|
|
|
var viewStatusPublisher: Published<LocationsListViewStatus>.Publisher { get }
|
2023-04-12 23:07:42 +00:00
|
|
|
|
2023-04-11 22:14:40 +00:00
|
|
|
// MARK: Functions
|
2023-04-12 23:07:42 +00:00
|
|
|
|
2023-04-12 16:58:27 +00:00
|
|
|
func loadLocations()
|
2023-04-12 23:07:42 +00:00
|
|
|
func location(at indexPath: IndexPath) -> Location
|
|
|
|
func numberOfLocations(in section: Int) -> Int
|
|
|
|
func openLocationsAdd()
|
|
|
|
func openWikipedia(at indexPath: IndexPath)
|
2023-04-11 22:14:40 +00:00
|
|
|
|
|
|
|
}
|