import { default as React, ReactNode } from 'react'; /** * Question object representing a votable item */ export type Question = { [key: string]: any; /** Current vote count (positive or negative) */ vote: number; /** Unique identifier for the question */ id: string | number; /** Whether voting up is disabled (auto-calculated) */ isDisabledUp?: boolean; /** Whether voting down is disabled (auto-calculated) */ isDisabledDown?: boolean; }; /** * Context value provided by QuadraticVoteProvider */ export interface QuadraticVoteType { /** Array of questions with their current vote state */ questions: Question[]; /** Function to cast a vote on a question */ vote: (id: string | number, vote: number) => void; /** Total available credits for allocation */ credits: number; /** Remaining unallocated credits */ availableCredits: number; /** Function to reset all votes to zero */ reset: () => void; } export declare const QuadraticVote: React.Context; /** * QuadraticVoteProvider is the context provider that manages voting state. * * Wraps your voting interface and provides state management for quadratic voting. * Handles credit allocation, vote validation, and smooth animations. * * @param credits - Total voting credits (must be between 4-225) * @param questions - Array of questions to vote on * @param children - Your voting interface components * * @example * ```tsx * const questions = [ * { question: 'Should we...?', vote: 0, id: 0 } * ] * * * * * ``` */ declare const QuadraticVoteProvider: ({ children, credits, questions: qs, }: { children: ReactNode; credits: number; questions: Question[]; }) => import("react/jsx-runtime").JSX.Element; export default QuadraticVoteProvider; //# sourceMappingURL=QuadraticVoteProvider.d.ts.map