package user

import (
	"context"

	"github.com/SamuelTariku/FortuneBet-Backend/internal/domain"
)

func (s *Service) SearchUserByNameOrPhone(ctx context.Context, searchString string, role *domain.Role, companyID domain.ValidInt64) ([]domain.User, error) {
	// Search user
	return s.userStore.SearchUserByNameOrPhone(ctx, searchString, role, companyID)

}
func (s *Service) UpdateUser(ctx context.Context, user domain.UpdateUserReq) error {
	// update user
	return s.userStore.UpdateUser(ctx, user)

}

func (s *Service) UpdateUserCompany(ctx context.Context, id int64, companyID int64) error {
	// update user
	return s.userStore.UpdateUserCompany(ctx, id, companyID)
}

func (s *Service) UpdateUserSuspend(ctx context.Context, id int64, status bool) error {
	// update user
	return s.userStore.UpdateUserSuspend(ctx, id, status)
}
func (s *Service) GetUserByID(ctx context.Context, id int64) (domain.User, error) {
	return s.userStore.GetUserByID(ctx, id)
}
