package service

import (
	"context"
	"eslogad-be/internal/contract"
	"eslogad-be/internal/entities"

	"github.com/google/uuid"
)

type UserProcessor interface {
	UpdateUser(ctx context.Context, id uuid.UUID, req *contract.UpdateUserRequest) (*contract.UserResponse, error)
	CreateUser(ctx context.Context, req *contract.CreateUserRequest) (*contract.UserResponse, error)
	DeleteUser(ctx context.Context, id uuid.UUID) error
	GetUserByID(ctx context.Context, id uuid.UUID) (*contract.UserResponse, error)
	GetUserByEmail(ctx context.Context, email string) (*contract.UserResponse, error)
	GetUserEntityByEmail(ctx context.Context, email string) (*entities.User, error)
	ChangePassword(ctx context.Context, userID uuid.UUID, req *contract.ChangePasswordRequest) error

	GetUserRoles(ctx context.Context, userID uuid.UUID) ([]contract.RoleResponse, error)
	GetUserPermissionCodes(ctx context.Context, userID uuid.UUID) ([]string, error)
	GetUserDepartments(ctx context.Context, userID uuid.UUID) ([]contract.DepartmentResponse, error)

	GetUserProfile(ctx context.Context, userID uuid.UUID) (*contract.UserProfileResponse, error)
	UpdateUserProfile(ctx context.Context, userID uuid.UUID, req *contract.UpdateUserProfileRequest) (*contract.UserProfileResponse, error)

	// New optimized listing
	ListUsersWithFilters(ctx context.Context, req *contract.ListUsersRequest) ([]contract.UserResponse, int, error)

	// Get active users for mention purposes
	GetActiveUsersForMention(ctx context.Context, search *string, limit int) ([]contract.UserResponse, error)
}
