<?php
declare(strict_types=1);
require_once __DIR__ . '/../../../app/Models/Setting.php';
require_once __DIR__ . '/../../../app/Config/functions.php';

require_login();
require_role('admin');

header('Content-Type: application/json');
$model = new Setting();
$model->resetToDefault();

echo json_encode(['success' => true, 'message' => 'Settings reset to default values.']);
