package com.viettel.campaign.service;

import com.viettel.campaign.model.ccms_full.Customer;
import com.viettel.campaign.model.ccms_full.CustomerList;
import com.viettel.campaign.model.ccms_full.CustomizeFieldObject;
import com.viettel.campaign.model.ccms_full.CustomizeFields;
import com.viettel.campaign.web.dto.*;
import com.viettel.campaign.web.dto.request_dto.CustomerRequestDTO;
import com.viettel.campaign.web.dto.request_dto.CustomizeRequestDTo;
import com.viettel.campaign.web.dto.request_dto.SearchCustomerRequestDTO;
import com.viettel.econtact.filter.UserSession;

import java.util.Date;
import java.util.List;
import java.util.Map;

public interface CustomerService {

    ResultDTO getAllCustomer(int page, int pageSize, String sort, long customerListId, long companySiteId);

    ResultDTO getCustomerId(Long customerId);

    ResultDTO searchAllCustomer(int page, int pageSize, String sort, long customerListId, long companySiteId, String name, String mobileNumber, String email);

    ResultDTO createCustomer(CustomerDTO customerDTO);

    ResultDTO deleteCustomer(CustomerRequestDTO customerRequestDTO);

    ResultDTO deleteIds(CustomerRequestDTO customerRequestDTO);

    ResultDTO getCustomerDetailById(Long companySiteId, Long customerListId, Long customerId);

    // ------------ customer list ------------ //

    ResultDTO getAllCustomerList(int page, int pageSize, String sort, Long companySiteId);

    // THÍM NÀO MERGE CONFLICT THÌ GIỮ LẠI HỘ E CÁI METHOD NÀY VỚI
    // VIẾT ĐI VIẾT LẠI 4 LẦN RỒI ĐẤY
    ResultDTO createCustomerList(CustomerListDTO customerListDTO, String userName);

    ResultDTO updateCustomerList(CustomerListDTO customerListDTO, String userName);

    ResultDTO deleteCustomerList(CustomerListDTO customerListDTO);

    ResultDTO deleteCustomerListIds(CustomerRequestDTO customerRequestDTO);

    ResultDTO searchCustomerList(SearchCustomerRequestDTO searchCustomerRequestDTO);

    CustomerList getLatestCreated(Long companySiteId);

    // ------------ customer contact ------------ //

    ResultDTO getCustomerContact(CustomerContactDTO customer);

    // danh sach khach hang cua chien dich //

    List<CustomerListDTO> getCustomerListInfo(CampaignCustomerDTO campaignCustomerDTO);

    List<CustomerDTO> getIndividualCustomerInfo(CampaignCustomerDTO campaignCustomerDTO);


    // ------------ customer  ------------ //

    ResultDTO getCustomerRecall(Long campaignId, Long customerId);

    List<Customer> findAllByCondition(Long siteId, Date endTime);
    Customer update(Customer c);

    List<CustomizeFields> getDynamicHeader(Long companySiteId);

    byte[] buildTemplate(Long companySiteId);

    Map<String, Object> readAndValidateCustomer(String path, List<CustomizeFields> headerDTOS, UserSession userSession, Long customerListId);

    List<CustomizeFieldObject> getCustomizeField(Long customerId);
    List<Customer> searchByQuery(String queryString);
    Long countByQuery(String queryString);
//    Map<String, CustomizeRequestDTo>  searchCustomer();
////    List<CustomizeFields> searchCustomize();
    ResultDTO listCustomizeFields(CustomizeRequestDTo customizeFields);
    ResultDTO searchCustomizeFields(CustomizeRequestDTo customizeRequestDTo);
}
