package com.flightticket.service;

import com.flightticket.dto.agency.AgencyResponse;
import com.flightticket.dto.agency.CreateAgencyRequest;
import com.flightticket.dto.agency.UpdateAgencyRequest;
import com.flightticket.model.entity.Agency;
import com.flightticket.model.enums.SubscriptionType;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.List;
import java.util.UUID;

public interface AgencyManagementService {
    
    /**
     * Create a new agency with KYC documents and initialize wallet
     */
    AgencyResponse createAgency(CreateAgencyRequest request, UUID createdBy);
    
    /**
     * Update agency information
     */
    AgencyResponse updateAgency(UUID agencyId, UpdateAgencyRequest request);
    
    /**
     * Verify an agency (Super_Admin only)
     */
    AgencyResponse verifyAgency(UUID agencyId, UUID verifiedBy);
    
    /**
     * Manually activate an agency (Super_Admin only)
     */
    AgencyResponse activateAgency(UUID agencyId, UUID activatedBy);
    
    /**
     * Manually deactivate an agency with reason (Super_Admin only)
     */
    AgencyResponse deactivateAgency(UUID agencyId, UUID deactivatedBy, String reason);
    
    /**
     * Get agency by ID
     */
    AgencyResponse getAgencyById(UUID agencyId);
    
    /**
     * Get all agencies
     */
    List<AgencyResponse> getAllAgencies();
    
    /**
     * Get agencies pending verification (Super_Admin only)
     */
    List<AgencyResponse> getPendingVerificationAgencies();
    
    /**
     * Get agencies nearing expiration within threshold days
     */
    List<AgencyResponse> getAgenciesNearingExpiration(int daysThreshold);
    
    /**
     * Update markup percentage for an agency
     */
    AgencyResponse updateMarkup(UUID agencyId, BigDecimal markupPercentage, UUID updatedBy);
    
    /**
     * Record payment for an agency
     */
    AgencyResponse recordPayment(UUID agencyId, LocalDate paymentDate);
    
    /**
     * Renew subscription for an agency
     */
    AgencyResponse renewSubscription(UUID agencyId, SubscriptionType newType);
    
    /**
     * Validate if agency can perform transactions
     */
    void validateAgencyCanTransact(UUID agencyId);
    
    /**
     * Get agency entity (internal use)
     */
    Agency getAgencyEntity(UUID agencyId);
}
