"use strict";

const unmapImageInfo = require("../unmap-image-info");

module.exports = function unmapImageOptions(options) {
	return {
		body: options.description,
		url: options.image.url,
		info: {
			... unmapImageInfo(options.image),
			thumbnail_url: options.thumbnail.url,
			thumbnail_info: (options.thumbnail.url != null)
				? unmapImageInfo(options.thumbnail)
				: undefined
		}
	};
};
