// Production Configuration for Property Brochure Generator LWC
// Update these values before deploying to production

export const PRODUCTION_CONFIG = {
    // PDF Generation API Configuration
    PDF_API_BASE_URL: 'http://160.187.166.67:8000/api', // Production PDF Generator API
    
    // Salesforce API Configuration
    SALESFORCE_API_VERSION: 'v59.0',
    
    // PDF Generation Settings
    PDF_SETTINGS: {
        maxImageSize: 5 * 1024 * 1024, // 5MB
        supportedImageFormats: ['jpg', 'jpeg', 'png', 'webp'],
        maxImagesPerBrochure: 20,
        defaultPageSize: 'A4',
        defaultOrientation: 'portrait'
    },
    
    // Error Handling
    ERROR_MESSAGES: {
        API_CONNECTION_FAILED: 'Unable to connect to PDF generation service. Please try again later.',
        PROPERTY_LOAD_FAILED: 'Failed to load property data. Please refresh and try again.',
        TEMPLATE_LOAD_FAILED: 'Failed to load templates. Please refresh and try again.',
        PDF_GENERATION_FAILED: 'PDF generation failed. Please check your data and try again.',
        IMAGE_UPLOAD_FAILED: 'Image upload failed. Please check file format and size.',
        VALIDATION_FAILED: 'Please complete all required fields before proceeding.'
    },
    
    // Success Messages
    SUCCESS_MESSAGES: {
        PROPERTY_LOADED: 'Property data loaded successfully',
        TEMPLATE_SELECTED: 'Template selected successfully',
        PREVIEW_GENERATED: 'Preview generated successfully',
        PDF_DOWNLOADED: 'PDF downloaded successfully',
        BROCHURE_CREATED: 'Property brochure created successfully'
    },
    
    // Validation Rules
    VALIDATION: {
        requiredFields: ['propertyName', 'propertyType', 'location', 'price', 'description'],
        minPrice: 100000, // Minimum price in AED
        maxPrice: 100000000, // Maximum price in AED
        minArea: 100, // Minimum area in sq ft
        maxArea: 50000 // Maximum area in sq ft
    },
    
    // Performance Settings
    PERFORMANCE: {
        debounceDelay: 300, // ms
        maxRetries: 3,
        timeout: 30000 // 30 seconds
    }
};

// Helper function to get configuration value
export function getConfig(key) {
    return PRODUCTION_CONFIG[key] || null;
}

// Helper function to get error message
export function getErrorMessage(key) {
    return PRODUCTION_CONFIG.ERROR_MESSAGES[key] || 'An unexpected error occurred.';
}

// Helper function to get success message
export function getSuccessMessage(key) {
    return PRODUCTION_CONFIG.SUCCESS_MESSAGES[key] || 'Operation completed successfully.';
} 