package io.gmss.fiscad.interfaces.infocad.metier;

import io.gmss.fiscad.entities.infocad.metier.Enquete;
import io.gmss.fiscad.entities.infocad.metier.EnqueteFiltreResponse;
import io.gmss.fiscad.exceptions.BadRequestException;
import io.gmss.fiscad.exceptions.NotFoundException;
import io.gmss.fiscad.paylaods.request.EnquetePayLoad;
import io.gmss.fiscad.paylaods.request.EnqueteTraitementPayLoad;
import io.gmss.fiscad.paylaods.request.FiltreEnquetePayLoad;
import io.gmss.fiscad.paylaods.response.EnqueteNonSyncResponse;
import io.gmss.fiscad.paylaods.response.EnqueteResponse;
import io.gmss.fiscad.paylaods.response.FicheEnqueteResponse;
import io.gmss.fiscad.paylaods.response.UserDecoupageEnqResponses;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Optional;

public interface EnqueteService {

    Enquete createEnquete(EnquetePayLoad enquetePayLoad) throws BadRequestException;

    Enquete updateEnquete(EnquetePayLoad enquetePayLoad) throws NotFoundException;

    void deleteEnquete(Long id) throws NotFoundException;

    Page<Enquete> getEnqueteList(Pageable pageable);

    List<Enquete> getEnqueteList();

    List<EnqueteResponse> getEnqueteCommuneArrondBloc();

    List<EnqueteFiltreResponse> getEnqueteCommuneArrondBlocFiltre(FiltreEnquetePayLoad filtreEnquetePayLoad);

    Optional<Enquete> getEnqueteById(Long id);

    Enquete validerEnquete(EnqueteTraitementPayLoad enqueteTraitementPayLoad);

    Enquete rejeterEnquete(EnqueteTraitementPayLoad enqueteTraitementPayLoad);

    List<Enquete> validerEnquete(List<EnqueteTraitementPayLoad> enqueteTraitementPayLoads);

    List<Enquete> rejeterEnquete(List<EnqueteTraitementPayLoad> enqueteTraitementPayLoads);

    Enquete finaliserEnquete(Long enqueteId);

    Enquete reglerLitigeEnquete(Long enqueteId);

    public UserDecoupageEnqResponses getDecoupageAdminUserConnecterAndStat();
    public UserDecoupageEnqResponses getDecoupageAdminUserConnecterAndStatForDgi();

    public FicheEnqueteResponse getFicheEnquete(Long EnqueteId,String nupProvisoir);


    public List<EnqueteNonSyncResponse> getEnqueteValideNonSynch(Long terminalId);


}
