import { r as resetSetup } from '../../auth/setup/POST-DYMc2GPx.js';

async function handler(req, res) {
  try {
    if (process.env.NODE_ENV === "production") {
      return res.status(403).json({
        success: false,
        error: "Setup reset is not allowed in production"
      });
    }
    resetSetup();
    res.json({
      success: true,
      message: "Setup state reset successfully"
    });
  } catch (error) {
    console.error("Failed to reset setup:", error);
    res.status(500).json({
      success: false,
      error: "Failed to reset setup",
      message: String(error)
    });
  }
}

export { handler as h };
