interface PointsCardProps {
  balance: number;
  todayConsumed: number;
  onRecharge: () => void;
  onViewDetail: () => void;
  onViewPricing: () => void;
}

export default function PointsCard({
  balance,
  todayConsumed,
  onRecharge,
  onViewDetail,
  onViewPricing,
}: PointsCardProps) {
  return (
    <div className="profile-points-section">
      <div className="profile-points-grid">
        <div className="profile-points-card">
          <div className="profile-points-label">剩余积分</div>
          <div className="profile-points-value-row">
            <span className="profile-points-value primary">{balance}</span>
            <span className="profile-points-unit">分</span>
          </div>
        </div>
        <div className="profile-points-card">
          <div className="profile-points-label">今日消耗</div>
          <div className="profile-points-value-row">
            <span className="profile-points-value danger">{todayConsumed}</span>
            <span className="profile-points-unit">分</span>
          </div>
        </div>
      </div>

      <div className="profile-points-actions-row">
        <button className="btn btn-primary btn-sm" onClick={onRecharge}>
          积分充值
        </button>
        <button className="btn btn-ghost btn-sm" onClick={onViewDetail}>
          充值明细
        </button>
        <button className="btn btn-ghost btn-sm" onClick={onViewPricing}>
          产品定价
        </button>
      </div>
    </div>
  );
}
