<?php
// =============================================================================
// Master Panel — configuration
// PHP 7.4 / 8.1 compatible
// =============================================================================

if (!defined('PANEL_ROOT')) {
    define('PANEL_ROOT', dirname(__DIR__));
}

// SQLite database path
if (!defined('PANEL_DB_PATH')) {
    define('PANEL_DB_PATH', PANEL_ROOT . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . 'panel.db');
}

// Default admin credentials seeded into admin_users on first DB creation.
if (!defined('PANEL_DEFAULT_ADMIN_USER')) {
    define('PANEL_DEFAULT_ADMIN_USER', 'admin');
}
if (!defined('PANEL_DEFAULT_ADMIN_PASS')) {
    define('PANEL_DEFAULT_ADMIN_PASS', 'admin');
}

// Verbose JSON error responses on AJAX endpoints. Set to 0 in production.
// Errors go to data/panel.error.log (viewable via the Error Log admin page)
// and clients see a clean 500 instead of SQL fragments + file paths.
if (!defined('PANEL_DEBUG')) {
    define('PANEL_DEBUG', 0);
}

if (!defined('PANEL_SESSION_NAME')) {
    define('PANEL_SESSION_NAME', 'MPANEL');
}
