/* © SRSoftware 2025 */
package de.srsoftware.umbrella.poll;

import de.srsoftware.umbrella.core.model.Permission;
import de.srsoftware.umbrella.core.model.Poll;
import de.srsoftware.umbrella.core.model.UmbrellaUser;
import java.util.Collection;
import java.util.Map;

public interface PollDb {
	Collection<Poll> listPolls(UmbrellaUser user);

	Poll.Evaluation loadEvaluation(Poll poll);

	Poll loadPoll(String id);

	Map<Integer,Integer> loadSelections(Poll poll, UmbrellaUser user);

	Poll save(Poll poll);
	void saveSelection(Poll poll, Map<Integer,Integer> optionsToWeights, String guestName);

	void saveSelection(Poll poll, Map<Integer,Integer> optionsToWeights, UmbrellaUser user);

	void setPermission(String pollId, UmbrellaUser userId, Permission permission);
}
