import Foundation
import SwiftUI
import Engine

struct StartPage: View {
    @EnvironmentObject var store: AppStore
    
    var body: some View {
        VStack {
            Spacer()
            // Image.Splash.logo
            Spacer()
            Text("Snikket iOS \(Const.appVersion)")
                // .font(.body5)
                .foregroundColor(.black)
                .padding(.bottom, 20)

            Text(L10n.Lang.prompt)
                .foregroundColor(Color.Main.black)
                .onTapGesture {
                    let engine = Engine()
                    engine.testme()
                }
        }
            .ignoresSafeArea()
            .onLoad {
                store.dispatch(.tempAction(.dumb))
            }
    }
}

#if DEBUG
struct StartPage_Previews: PreviewProvider {
    static var previews: some View {
        showPreview(stateConfig: { _ in })
    }
}
#endif
