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

#pragma once

#include "IDetailCustomization.h"
#include "CoreMinimal.h"
#include "SourcifyCore.h"

class FSourcifyModule;
class SEditableTextBox;

class FSourcifySettingsDetails : public IDetailCustomization
{
public:
	FSourcifySettingsDetails();

	/** Makes a new instance of this detail layout class for a specific detail view requesting it */
	static TSharedRef<IDetailCustomization> MakeInstance();

	/** IDetailCustomization interface */
	virtual void CustomizeDetails(IDetailLayoutBuilder& DetailBuilder) override;

private:
	void LOG_LicenseHolder();

private:
	FSourcifyModule& SourcifyModule;
	TSharedPtr<SEditableTextBox> LicenseKeyBox;
	bool LicenseReadyToVerify = false;
	Sourcify::LicenseHolderInfo LicenseHolder;
	float LicenseCheckTimerElapsedTime = 0.f;
};