import { StateStore } from './StateStore';
import type { FeedsClient } from '../feeds-client';
import type { PollVote, QueryPollVotesRequest, PollUpdatedFeedEvent, PollClosedFeedEvent, PollVoteCastedFeedEvent, PollVoteChangedFeedEvent, PollVoteRemovedFeedEvent, Poll as PollType } from '../gen/models';
export declare const isVoteAnswer: (vote: PollVote) => boolean;
export type PollAnswersQueryParams = QueryPollVotesRequest & {
    poll_id: string;
    user_id?: string;
};
type OptionId = string;
export type PollState = Omit<PollType, 'own_votes' | 'id'> & {
    last_activity_at: Date;
    max_voted_option_ids: OptionId[];
    own_votes_by_option_id: Record<OptionId, PollVote>;
    own_answer?: PollVote;
};
type PollInitOptions = {
    client: FeedsClient;
    poll: PollType;
};
export declare class StreamPoll {
    readonly state: StateStore<PollState>;
    id: string;
    private readonly client;
    constructor({ client, poll }: PollInitOptions);
    private readonly getInitialStateFromPollResponse;
    reinitializeState: (poll: PollInitOptions["poll"]) => void;
    get data(): PollState;
    handlePollUpdated: (event: PollUpdatedFeedEvent) => void;
    handlePollClosed: (event: PollClosedFeedEvent) => void;
    handleVoteCasted: (event: PollVoteCastedFeedEvent) => void;
    handleVoteChanged: (event: PollVoteChangedFeedEvent) => void;
    handleVoteRemoved: (event: PollVoteRemovedFeedEvent) => void;
}
export {};
