// Copyright (c) 2024 Codemongous LLC. All Rights Reserved.

#pragma once

#include "ISCW_EngineVersionComparison.h"
#include "ISCW_UPackage.h"
#include "SCW_UObject.h"

#if ISCW_UE_VERSION_OLDER_THAN(5, 6, 0)
#include "ISCW_UMetaData.h"
#else
#include "ISCW_FMetaData.h"
#endif // ISCW_UE_VERSION_OLDER_THAN(5, 6, 0)

class UPackage;

namespace Sourcify
{
	class SCW_UPackage : public SCW_UObject, public virtual ISCW_UPackage
	{
	public:
		SCW_UPackage(UPackage* InPackage);

		UPackage* ToUPackage() const;

		ISCW_UPackagePtr ToUPackagePtr() override;
		ISCW_UPackageConstPtr ToUPackagePtr() const override;

#if ISCW_UE_VERSION_OLDER_THAN(5, 6, 0)
		ISCW_UMetaDataPtr GetMetaData() const override;
#else
		ISCW_FMetaDataPtr GetMetaData() const override;
#endif // ISCW_UE_VERSION_OLDER_THAN(5, 6, 0)

		wstring GetPathName() const override;

		bool IsDirty() const override;

	protected:
		UPackage* Package;
	};
} // namespace Sourcify