#!/bin/sh

#shellcheck disable=SC2034

ntfy_creds() {
	# unload
	[ "$1" = "unload" ] && unset NTFY_URL NTFY_TOPIC NTFY_TOKEN && return 0

	# load
	NTFY_URL=
	NTFY_TOKEN=
	NTFY_TOPIC=
}

nextcloud_creds() {
	# unload
	[ "$1" = "unload" ] && unset NC_URL NC_USER NC_TOKEN NC_SHARE_PATH NC_FOLDER_ID && return 0

	# load
	NC_URL=
	NC_USER=
	NC_TOKEN=
	NC_SHARE_PATH=
	NC_FOLDER_ID=
}

github_creds() {
	# unload
	[ "$1" = "unload" ] && unset GH_TOKEN && return 0

	# load
	GH_TOKEN=
}

matrix_creds() {
	# unload
	[ "$1" = "unload" ] && unset MX_TOKEN MX_URL && return 0

	# load
	MX_TOKEN=
	MX_URL=
}

navidrome_creds() {
	# unload
	[ "$1" = "unload" ] && unset ND_USER ND_PASS ND_URL && return 0

	# load
	ND_USER=
	ND_PASS=
	ND_URL=
}
