<?php
/**
 * Kitchen Staff Logout API
 * Destroys kitchen staff session
 */

header('Content-Type: application/json');
require_once 'config.php';

session_start();

// Clear all kitchen staff related sessions
unset($_SESSION['kitchen_staff_id']);
unset($_SESSION['kitchen_staff_name']);
unset($_SESSION['kitchen_staff_email']);
unset($_SESSION['kitchen_staff_role']);
unset($_SESSION['kitchen_staff_position']);
unset($_SESSION['kitchen_staff_image']);
unset($_SESSION['kitchen_staff_login_time']);
unset($_SESSION['kitchen_staff_remember_me']);

// Destroy entire session
session_destroy();

sendResponse(true, 'Logged out successfully', null);

$conn->close();
?>
