package com.flightticket.service;

import java.time.LocalDate;

/**
 * Service for validating passenger details in booking modifications.
 * 
 * This service provides validation methods for passenger information including
 * contact details (email, phone) and document information (passport, ID).
 * 
 * Requirements: 2.2, 2.3
 */
public interface PassengerValidationService {
    
    /**
     * Validate email address format according to RFC 5322.
     * 
     * @param email The email address to validate
     * @return true if the email is valid, false otherwise
     * 
     * Requirements: 2.2 - Validate email format
     * Property 4: Contact Information Validation
     */
    boolean validateEmail(String email);
    
    /**
     * Validate phone number in international format.
     * 
     * Accepts formats like:
     * - +1234567890
     * - +1-234-567-8900
     * - +1 (234) 567-8900
     * 
     * @param phone The phone number to validate
     * @return true if the phone number is valid, false otherwise
     * 
     * Requirements: 2.2 - Validate phone format
     * Property 4: Contact Information Validation
     */
    boolean validatePhone(String phone);
    
    /**
     * Validate document number format.
     * 
     * Validates that the document number:
     * - Is not null or empty
     * - Contains only alphanumeric characters
     * - Has a reasonable length (6-20 characters)
     * 
     * @param documentNumber The document number to validate
     * @return true if the document number is valid, false otherwise
     * 
     * Requirements: 2.3 - Validate document number format
     * Property 5: Document Validation
     */
    boolean validateDocumentNumber(String documentNumber);
    
    /**
     * Validate document expiry date.
     * 
     * Validates that the expiry date is in the future.
     * 
     * @param expiryDate The document expiry date to validate
     * @return true if the expiry date is valid (future date), false otherwise
     * 
     * Requirements: 2.3 - Validate document expiry date
     * Property 5: Document Validation
     */
    boolean validateDocumentExpiry(LocalDate expiryDate);
    
    /**
     * Validate passenger name.
     * 
     * Validates that the name:
     * - Is not null or empty
     * - Does not contain special characters (except spaces, hyphens, apostrophes)
     * - Has a reasonable length (1-100 characters)
     * 
     * @param name The passenger name to validate
     * @return true if the name is valid, false otherwise
     * 
     * Requirements: 2.2 - Validate passenger name
     */
    boolean validatePassengerName(String name);
}
