#include "UiInterfaceFactory.h"

#ifdef __linux__
#include "XcbInterface.h"
#include "WaylandInterface.h"
#else
#include "Win32UiInterface.h"
#endif

std::unique_ptr<AbstractUIInterface> UiInterfaceFactory::create(DesktopManager* desktopManager, Backend backend)
{
#ifdef __linux__
    if (backend == Backend::UNSET || backend == Backend::X11)
    {
        return std::make_unique<XcbInterface>(desktopManager);
    }
    else
    {
        return std::make_unique<WaylandInterface>(desktopManager);
    }
#else
    return std::make_unique<Win32UiInterface>();
#endif
}
