package client

import (
	"context"

	"google.golang.org/grpc"
	activityv1 "hyapp.local/api/proto/activity/v1"
)

// RegistrationRewardClient abstracts gateway access to activity-service registration reward reads.
type RegistrationRewardClient interface {
	GetRegistrationRewardEligibility(ctx context.Context, req *activityv1.GetRegistrationRewardEligibilityRequest) (*activityv1.GetRegistrationRewardEligibilityResponse, error)
}

type grpcRegistrationRewardClient struct {
	client activityv1.RegistrationRewardServiceClient
}

func NewGRPCRegistrationRewardClient(conn *grpc.ClientConn) RegistrationRewardClient {
	return &grpcRegistrationRewardClient{client: activityv1.NewRegistrationRewardServiceClient(conn)}
}

func (c *grpcRegistrationRewardClient) GetRegistrationRewardEligibility(ctx context.Context, req *activityv1.GetRegistrationRewardEligibilityRequest) (*activityv1.GetRegistrationRewardEligibilityResponse, error) {
	return c.client.GetRegistrationRewardEligibility(ctx, req)
}
