<?php
$workspace_path = "c:\\Users\\User\\Documents\\Antigravity Projects\\Apperal Managment System -Vanila- PHP";
chdir($workspace_path . "\\api");

// Start mock session
if (session_status() === PHP_SESSION_NONE) {
    session_start();
}
$_SESSION['user_id'] = 1;
$_SESSION['user_role'] = 'owner';
$_SESSION['role'] = 'owner';
$_SESSION['company_id'] = 1;
$_SESSION['company_name'] = 'NexCore Apparel';
$_SESSION['company_currency'] = 'LKR';

// Define inputs for email sending
$_POST = [
    'action' => 'send_email',
    'id' => 17,
    'email' => 'customer@test.com',
    'message' => 'Hello! Please find your invoice attached.'
];

// Include the api directly (which outputs json and exits)
require_once 'invoices.php';
?>
