// © 2025 Naked People Team. All Rights Reserved.

#pragma once

#include "CoreMinimal.h"
#include "CommonUserWidget.h"
#include "AudioSettingsTab.generated.h"

class USlider;

// Audio settings tab. Master / Music / SFX volume sliders. Changes apply live through
// UAudioSettingsSubsystem (routed via the configured SoundMix) and persist on close.
UCLASS(Abstract)
class NAKEDDESIRE_API UAudioSettingsTab : public UCommonUserWidget
{
	GENERATED_BODY()

public:
	void RefreshFromSettings();

protected:
	virtual void NativeConstruct() override;

private:
	UPROPERTY(meta = (BindWidget))
	TObjectPtr<USlider> MasterSlider;

	UPROPERTY(meta = (BindWidget))
	TObjectPtr<USlider> MusicSlider;

	UPROPERTY(meta = (BindWidget))
	TObjectPtr<USlider> SfxSlider;

	UFUNCTION()
	void OnMasterChanged(float Value);

	UFUNCTION()
	void OnMusicChanged(float Value);

	UFUNCTION()
	void OnSfxChanged(float Value);

	void ApplyLive();
};