//
//  AppDelegate.swift
//  Locations
//
//  Created by Javier Cicchelli on 08/04/2023.
//  Copyright © 2023 Röck+Cöde. All rights reserved.
//

import Core
import UIKit

@main
class AppDelegate: UIResponder, UIApplicationDelegate {
    
    // MARK: Properties
    
    lazy var coordinator: LocationsListCoordinator = .init(router: router)
    lazy var router: WindowRouter = .init(window: window)
    lazy var window: UIWindow? = .init(frame: UIScreen.main.bounds)
    
    // MARK: UIApplicationDelegate

    func application(
        _ application: UIApplication,
        didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
    ) -> Bool {
        coordinator.present(animated: false, onDismiss: nil)

        return true
    }
    
    func applicationDidEnterBackground(_ application: UIApplication) {
        // Save changes in the application's managed object context when the application transitions to the background.
    }

}
