# scripts/settings/SettingsStorage.gd
extends RefCounted
class_name SettingsStorage

const FILE_PATH := "user://settings.cfg"

var _config := ConfigFile.new()

func load() -> void:
	_config.load(FILE_PATH)

func save() -> void:
	_config.save(FILE_PATH)

func has(section: String, key: String) -> bool:
	return _config.has_section_key(section, key)

func get_value(section: String, key: String, default):
	return _config.get_value(section, key, default)

func set_value(section: String, key: String, value) -> void:
	_config.set_value(section, key, value)
