package client

import (
	"context"

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

// LuckyGiftClient abstracts gateway access to activity-service lucky gift eligibility checks.
type LuckyGiftClient interface {
	CheckLuckyGift(ctx context.Context, req *activityv1.CheckLuckyGiftRequest) (*activityv1.CheckLuckyGiftResponse, error)
}

type grpcLuckyGiftClient struct {
	client activityv1.LuckyGiftServiceClient
}

func NewGRPCLuckyGiftClient(conn *grpc.ClientConn) LuckyGiftClient {
	return &grpcLuckyGiftClient{client: activityv1.NewLuckyGiftServiceClient(conn)}
}

func (c *grpcLuckyGiftClient) CheckLuckyGift(ctx context.Context, req *activityv1.CheckLuckyGiftRequest) (*activityv1.CheckLuckyGiftResponse, error) {
	return c.client.CheckLuckyGift(ctx, req)
}
