package usersvc

import (
	subscriberepository "legalgo-BE-go/internal/accessor/subscribe"
	subscribeplanrepository "legalgo-BE-go/internal/accessor/subscribe_plan"
	userrepository "legalgo-BE-go/internal/accessor/user"
	userdomain "legalgo-BE-go/internal/domain/user"
)

type impl struct {
	subsRepo     subscriberepository.Subscribe
	userRepo     userrepository.User
	subsPlanRepo subscribeplanrepository.SubscribePlan
}

type User interface {
	GetUserProfile(string) (*userdomain.UserProfile, error)
	LoginAsUser(userdomain.UserLogin) (string, error)
	RegisterUser(userdomain.UserRegister) (string, error)
}

func New(
	subsRepo subscriberepository.Subscribe,
	userRepo userrepository.User,
	subsPlanRepo subscribeplanrepository.SubscribePlan,
) User {
	return &impl{
		subsRepo,
		userRepo,
		subsPlanRepo,
	}
}
