<?php
/**
 * Get Print Mode AJAX Handler
 * WAMP Environment Compatible
 */

header('Content-Type: application/json');
include '../db.php';
include '../includes/print_helpers.php';

try {
    $print_type = $_GET['print_type'] ?? 'receipt';
    $print_mode = PrintHelper::getFinalPrintMode($print_type);
    
    echo json_encode([
        'success' => true,
        'print_mode' => $print_mode,
        'print_type' => $print_type
    ]);
    
} catch (Exception $e) {
    echo json_encode([
        'success' => false,
        'message' => $e->getMessage()
    ]);
}
?>
