#pragma once
#include "configobject.hpp"
#include <qqmlintegration.h>

namespace ZShell::config {

class SidebarSizes : public ConfigObject {
	Q_OBJECT
	QML_ANONYMOUS

	CFG_PROPERTY(int, width, 520)

	public:
	explicit SidebarSizes(QObject* parent = nullptr) : ConfigObject(parent) {}
};

class Sidebar : public ConfigObject {
	Q_OBJECT
	QML_ANONYMOUS

	CFG_PROPERTY(int, dragThreshold, 30)
	CFG_PROPERTY(bool, enabled, true)
	CONFIG_SUBOBJECT(SidebarSizes, sizes)

	public:
	explicit Sidebar(QObject* parent = nullptr)
		: ConfigObject(parent), m_sizes(new SidebarSizes(this)) {}
};

} // namespace ZShell::config
