package client

import (
	"context"

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

// ActivityGrowthClient 只包装等级事件消费 RPC，避免 game-service 依赖 activity-service 内部实现。
type ActivityGrowthClient struct {
	client activityv1.GrowthLevelServiceClient
}

func NewActivityGrowthClient(conn *grpc.ClientConn) *ActivityGrowthClient {
	return &ActivityGrowthClient{client: activityv1.NewGrowthLevelServiceClient(conn)}
}

func (c *ActivityGrowthClient) ConsumeLevelEvent(ctx context.Context, req *activityv1.ConsumeLevelEventRequest, opts ...grpc.CallOption) (*activityv1.ConsumeLevelEventResponse, error) {
	return c.client.ConsumeLevelEvent(ctx, req, opts...)
}
