// Filesystem directory (relative to backend/src) where uploaded images will be stored
// Use path.join(__dirname, '..', UPLOAD_FS_DIR, fileName) in code
// In test mode, use a temporary directory in /tmp to avoid permission issues
const UPLOAD_FS_DIR = process.env.NODE_ENV === 'test' 
    ? '/tmp/test-image-uploader/images' 
    : 'data/images';

// Filesystem directory (relative to backend/src) where preview images will be stored
// Use path.join(__dirname, '..', PREVIEW_FS_DIR, fileName) in code
const PREVIEW_FS_DIR = process.env.NODE_ENV === 'test'
    ? '/tmp/test-image-uploader/previews'
    : 'data/previews';

// Preview generation configuration
const PREVIEW_CONFIG = {
    maxWidth: 800,        // Maximum width in pixels
    quality: 85,          // JPEG quality (0-100)
    format: 'jpeg'        // Output format
};

const time = {
    HOURS_24: 86400000,
    WEEK_1: 604800000
};

module.exports = { time, UPLOAD_FS_DIR, PREVIEW_FS_DIR, PREVIEW_CONFIG };