package user

import (
	"codeberg.org/mapleopentech/monorepo/native/desktop/maplefile/internal/domain/user"
)

type GetByEmailUseCase struct {
	userRepo user.Repository
}

func ProvideGetByEmailUseCase(userRepo user.Repository) *GetByEmailUseCase {
	return &GetByEmailUseCase{
		userRepo: userRepo,
	}
}

func (uc *GetByEmailUseCase) Execute(email string) (*user.User, error) {
	return uc.userRepo.GetByEmail(email)
}
