 import RxSwift
 import UIKit
 
-class RoutesViewController : UIViewController {
+class RoutesViewController : UIViewController, DataListTableView {
+    
+    typealias Model = Route
+    typealias CellType = RoutesCell
 
     @IBOutlet weak var spinner: UIActivityIndicatorView! {
         didSet {

    override func viewDidLoad() {
        super.viewDidLoad()

        tableView.customizeTableView(withColor: .black)

        setupRx()
    }

    private func setupRx() {
        KatangaBusApiClient().allRoutes()
            .trackActivity(activityIndicator)
            .toArray()
            .asDriver(onErrorJustReturn: [])
            .drive(tableView.rx.items(cellType: RoutesCell.self)) { row, route, routeCell in
                routeCell.routeId = route.id
                routeCell.routeName = route.name
            }
            .addDisposableTo(disposeBag)

        activityIndicator
            .drive(spinner.rx.isAnimating)
            .addDisposableTo(disposeBag)
    }

}

        }
    }

    @IBOutlet weak var tableView: UITableView!

    private let activityIndicator = ActivityIndicator()

