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

#pragma once

#include "ISCW_AActor.h"
#include "ISCW_FProperty.h"
#include "ISCW_UActorComponent.h"
#include "SCW_UObject.h"

class UActorComponent;

namespace Sourcify
{
	class SCW_UActorComponent : public SCW_UObject, public virtual ISCW_UActorComponent
	{
	public:
		SCW_UActorComponent(UActorComponent* InActorComponent);

		SCW_EComponentCreationMethod CreationMethod() const override;

		void DestroyComponent(bool bPromoteChildren = false) override;
		
		ISCW_AActorPtr GetOwner() const override;

		void GetUCSModifiedProperties(set<ISCW_FPropertyConstPtr>& ModifiedProperties) const override;

		bool IsCreatedByConstructionScript() const override;

		bool IsRegistered() const override;

		void RegisterComponent() override;

		void UnregisterComponent() override;
		
		UActorComponent* ToUActorComponent() const;

	protected:
		UActorComponent* ActorComponent;
	};
} // namespace Sourcify