package user

import (
	"context"

	"go.uber.org/zap"

	userusecase "codeberg.org/mapleopentech/monorepo/cloud/maplepress-backend/internal/usecase/user"
)

// GetUserService handles getting user information
type GetUserService interface {
	GetUser(ctx context.Context, tenantID string, input *userusecase.GetUserInput) (*userusecase.GetUserOutput, error)
}

type getUserService struct {
	getUC  *userusecase.GetUserUseCase
	logger *zap.Logger
}

// NewGetUserService creates a new GetUserService
func NewGetUserService(
	getUC *userusecase.GetUserUseCase,
	logger *zap.Logger,
) GetUserService {
	return &getUserService{
		getUC:  getUC,
		logger: logger.Named("get-user-service"),
	}
}

// GetUser retrieves a user by ID
func (s *getUserService) GetUser(ctx context.Context, tenantID string, input *userusecase.GetUserInput) (*userusecase.GetUserOutput, error) {
	return s.getUC.Execute(ctx, tenantID, input)
}
