"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createSupportSettingsController = createSupportSettingsController;
function createSupportSettingsController(settingsService, logger) {
    return {
        get: async (_req, res) => {
            try {
                const settings = await settingsService.getSettings();
                res.json({ success: true, data: settings });
            }
            catch (error) {
                logger.error("Failed to get support settings.", { error: error instanceof Error ? error.message : String(error) });
                res.status(500).json({ success: false, error: "Failed to get settings." });
            }
        },
        update: async (req, res) => {
            try {
                const settings = await settingsService.updateSettings(req.body);
                res.json({ success: true, data: settings });
            }
            catch (error) {
                logger.error("Failed to update support settings.", { error: error instanceof Error ? error.message : String(error) });
                res.status(500).json({ success: false, error: "Failed to update settings." });
            }
        }
    };
}
