--[=[
	Retrieves the manager
	@return PlayerDataStoreManager
]=]

function PlayerDataStoreService:PromiseManager()
	if self._dataStoreManagerPromise then
		return self._dataStoreManagerPromise
	end

	self._dataStoreManagerPromise = self._started
		:Then(function()
			return DataStorePromises.promiseDataStore(self._dataStoreName, self._dataStoreScope)
		end)
		:Then(function(dataStore)
			local manager = PlayerDataStoreManager.new(
				dataStore,
				function(player)
					return tostring(player.UserId)
				end)
			self._maid:GiveTask(manager)
			return manager
		end)

	return self._dataStoreManagerPromise
end

return PlayerDataStoreService
