import { STORAGE } from '@/core/constants/storage-keys'

export function isBackgroundPlaybackEnabled() {
	try {
		return !!uni.getStorageSync(STORAGE.backgroundPlayback)
	} catch (_) {
		return false
	}
}

export function setBackgroundPlaybackEnabled(enabled) {
	uni.setStorageSync(STORAGE.backgroundPlayback, !!enabled)
}
