#include <QGuiApplication>
#include <QLoggingCategory>
#include <QQmlApplicationEngine>

#include <QtQml/QQmlExtensionPlugin>
Q_IMPORT_QML_PLUGIN(DesignSystemPlugin)

int main(int argc, char *argv[])
{
  QGuiApplication app(argc, argv);

  QQmlApplicationEngine engine;
  QObject::connect(
      &engine, &QQmlApplicationEngine::objectCreationFailed, &app, []() { QCoreApplication::exit(-1); },
      Qt::QueuedConnection);

  // https://doc.qt.io/qt-6/qtqml-writing-a-module.html#eliminating-run-time-file-system-access
  engine.addImportPath(":/live.flowy/imports");

  engine.loadFromModule("Gallery", "Main");

  return app.exec();
}
