/**
 * Define a response method to serve page not found pages.
 * @function serverside.res.defineResPageNotFound
 * @param {object} context - Server context object.
 * @param {string} context.DEFAULT_LANG - Default lang.
 * @param {string} context.SUPPORTED_LANGS - Supported langs.
 * @param {number} context.PAGE_NOT_FOUND_STATUS_CODE - Status code.
 * @returns {function} - Res page not found function.
 * @author Taka Okunishi
 *
 */
var _getLocaledFilenamesFromContext = require('./_get_localed_filenames_from_context');
exports = module.exports = function (context) {
    context.assertKeys(['DEFAULT_LANG', 'SUPPORTED_LANGS', 'PAGE_NOT_FOUND_STATUS_CODE']);
    
    return exports._defineHtmlSendFunction({
        statusCode: context.PAGE_NOT_FOUND_STATUS_CODE,
        defaultLang: context.DEFAULT_LANG,
        filenames: _getLocaledFilenamesFromContext(
            context, '%s_PAGE_NOT_FOUND_HTML_PATH'
        )
    });
};

exports._defineHtmlSendFunction = require('./_define_html_send_function');