import React, { useState } from 'react'; import { useTranslation } from 'react-i18next'; import { Gift, Calendar, Users, Timer, DollarSign } from 'lucide-react'; const RewardDistribution: React.FC = () => { const { t } = useTranslation(); const [currentEpoch, setCurrentEpoch] = useState(1); const [trustScoreInput, setTrustScoreInput] = useState(500); const [totalParticipants, setTotalParticipants] = useState(1000); const [totalTrustScore, setTotalTrustScore] = useState(500000); const epochRewardPool = 1000000; // 1M PEZ per epoch const parliamentaryAllocation = epochRewardPool * 0.1; // 10% for NFT holders const trustScorePool = epochRewardPool * 0.9; // 90% for trust score rewards const rewardPerTrustPoint = trustScorePool / totalTrustScore; const userReward = trustScoreInput * rewardPerTrustPoint; const nftRewardPerHolder = parliamentaryAllocation / 201; const epochPhases = [ { name: t('rewardDist.active'), duration: '30 days', blocks: 432000, status: 'current' }, { name: t('rewardDist.claimPeriod'), duration: '7 days', blocks: 100800, status: 'upcoming' }, { name: t('rewardDist.closed'), duration: t('rewardDist.permanent'), blocks: 0, status: 'final' } ]; return (

{t('rewardDist.title')}

{t('rewardDist.subtitle')}

PezkuwiChain Logo
{/* Epoch Timeline */}

{t('rewardDist.epochTimeline')}

{t('rewardDist.currentEpoch')} #{currentEpoch}
setCurrentEpoch(parseInt(e.target.value))} className="w-full" />
{epochPhases.map((phase, index) => (

{phase.name}

{phase.duration}
{phase.blocks > 0 && (
{phase.blocks.toLocaleString()} blocks
)}
{index < epochPhases.length - 1 && (
)}
))}
{t('rewardDist.epochStartBlock')}
#{((currentEpoch - 1) * 432000).toLocaleString()}
{t('rewardDist.claimDeadline')}
#{((currentEpoch * 432000) + 100800).toLocaleString()}
{/* Reward Pool Info */}

{t('rewardDist.epochPool')}

{epochRewardPool.toLocaleString()} PEZ
{t('rewardDist.trustScorePool')} 90%
{t('rewardDist.parliamentaryNfts')} 10%

{t('rewardDist.nftRewards')}

{t('rewardDist.totalNfts')} 201
{t('rewardDist.perNftReward')} {Math.floor(nftRewardPerHolder).toLocaleString()} PEZ
{t('rewardDist.autoDistributed')}
{t('rewardDist.noClaimRequired')}
{/* Reward Calculator */}

{t('rewardDist.rewardCalculator')}

setTrustScoreInput(parseInt(e.target.value) || 0)} className="w-full px-4 py-2 bg-gray-800 text-white rounded-lg border border-gray-700 focus:border-cyan-500 focus:outline-none" />
setTotalParticipants(parseInt(e.target.value) || 1)} className="w-full px-4 py-2 bg-gray-800 text-white rounded-lg border border-gray-700 focus:border-cyan-500 focus:outline-none" />
setTotalTrustScore(parseInt(e.target.value) || 1)} className="w-full px-4 py-2 bg-gray-800 text-white rounded-lg border border-gray-700 focus:border-cyan-500 focus:outline-none" />
{t('rewardDist.rewardPerPoint')}
{rewardPerTrustPoint.toFixed(4)} PEZ
{t('rewardDist.yourShare')}
{((trustScoreInput / totalTrustScore) * 100).toFixed(3)}%
{t('rewardDist.estimatedReward')}
{Math.floor(userReward).toLocaleString()} PEZ
); }; export default RewardDistribution;