#pragma once
#include <functional>
#include "Common/File/Path.h"
#include "Common/UI/View.h"
#include "Common/UI/UIScreen.h"
#include "UI/MiscScreens.h"
class SavedataView;
class InstallZipScreen : public UIDialogScreenWithBackground {
public:
InstallZipScreen(const Path &zipPath);
void update() override;
bool key(const KeyInput &key) override;
const char *tag() const override { return "InstallZip"; }
protected:
void CreateViews() override;
private:
UI::EventReturn OnInstall(UI::EventParams ¶ms);
UI::EventReturn OnPlay(UI::EventParams ¶ms);
UI::Choice *installChoice_ = nullptr;
UI::Choice *playChoice_ = nullptr;
UI::Choice *backChoice_ = nullptr;
UI::TextView *doneView_ = nullptr;
SavedataView *existingSaveView_ = nullptr;
Path savedataToOverwrite_;
Path zipPath_;
std::vector<Path> destFolders_;
int destFolderChoice_ = 0;
ZipFileInfo zipFileInfo_{};
bool returnToHomebrew_ = true;
bool installStarted_ = false;
bool deleteZipFile_ = false;
};