package io.gmss.fiscad.interfaces.user;

import io.gmss.fiscad.entities.infocad.parametre.Structure;
import io.gmss.fiscad.entities.user.User;
import io.gmss.fiscad.enums.UserRole;
import io.gmss.fiscad.paylaods.JwtAuthenticationResponse;
import io.gmss.fiscad.paylaods.Login;
import io.gmss.fiscad.paylaods.UserListByStructureResponse;
import io.gmss.fiscad.paylaods.UserResponse;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

public interface UserService {

    User createUser(User user, boolean resetPassword);

    JwtAuthenticationResponse loginUser(Login login);

    User updateUser(Long id, User user);

    void updatePassword(String username, String pwd);

    void deleteUser(Long id);

    Page<User> getUserList(Pageable pageable);

    List<User> getUserList();

    List<UserResponse> getAllUserListResponse();

    List<User> getActivatedUserListByStructure(Long structureId);

    List<User> getUserUnActivatedListByStructure(Long StructureId);

    long countUser();

    User getUserById(Long id);

    User getUserByUsername(String username);

    User activateOrNotUser(Long id);

    User resetPassword(String username, String password);

    User assignStructureToUser(Structure structure);

    User validateUserAccount(String username, UserRole userRole);

    UserListByStructureResponse getListUserByStructure(Long structureId);

    List<UserResponse> getListUserResponseByStructure(Long structureId);

    UserResponse getUserResponseFromUser(User user);

    List<User> getUserByProfil(UserRole userRole);

}
