#pragma once

#include "AbstractDesktopApp.h"
#include "UiInterfaceFactory.h"
#include "CommandLineArgs.h"

#include <memory>

class MainApplication;
class DesktopManager;
class AbstractUiInterface;

class GuiApplication : public AbstractDesktopApp
{
public:
    GuiApplication(std::unique_ptr<CommandLineArgs> args = nullptr);

    ~GuiApplication();

    AbstractApp* getMainApplication() const override;

    void run();

    AbstractUIInterface* getUiInterface() const override;

    void setUiInterfaceBackend(UiInterfaceFactory::Backend backend);

protected:
    virtual void initializeViews();

    std::unique_ptr<DesktopManager> mDesktopManager;
    std::unique_ptr<MainApplication> mMainApplication;

private:
    UiInterfaceFactory::Backend mUiInterfaceBackend = UiInterfaceFactory::Backend::UNSET;
    std::unique_ptr<AbstractUIInterface> mUiInterface;
};
