package client

import (
	"context"

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

// SevenDayCheckInClient abstracts gateway access to activity-service seven-day checkin APIs.
type SevenDayCheckInClient interface {
	GetSevenDayCheckInStatus(ctx context.Context, req *activityv1.GetSevenDayCheckInStatusRequest) (*activityv1.GetSevenDayCheckInStatusResponse, error)
	SignSevenDayCheckIn(ctx context.Context, req *activityv1.SignSevenDayCheckInRequest) (*activityv1.SignSevenDayCheckInResponse, error)
}

type grpcSevenDayCheckInClient struct {
	client activityv1.SevenDayCheckInServiceClient
}

func NewGRPCSevenDayCheckInClient(conn *grpc.ClientConn) SevenDayCheckInClient {
	return &grpcSevenDayCheckInClient{client: activityv1.NewSevenDayCheckInServiceClient(conn)}
}

func (c *grpcSevenDayCheckInClient) GetSevenDayCheckInStatus(ctx context.Context, req *activityv1.GetSevenDayCheckInStatusRequest) (*activityv1.GetSevenDayCheckInStatusResponse, error) {
	return c.client.GetSevenDayCheckInStatus(ctx, req)
}

func (c *grpcSevenDayCheckInClient) SignSevenDayCheckIn(ctx context.Context, req *activityv1.SignSevenDayCheckInRequest) (*activityv1.SignSevenDayCheckInResponse, error) {
	return c.client.SignSevenDayCheckIn(ctx, req)
}
