App.CustomSlaveTrade = {
	export: function() {
		let textArea = document.createElement("textarea");
		textArea.value = JSON.stringify(V.nationalities);
		$("#importExportArea").html(textArea);
	},

	import: function() {
		let textArea = document.createElement("textarea");
		let button = document.createElement("button");
		button.name = "Load";
		button.innerHTML = "Load";
		button.onclick = () => {
			V.nationalities = JSON.parse(textArea.value);
			State.display(State.passage);
		};

		$("#importExportArea").html("").append(textArea).append(button);
	},

	generatePresetLinks: function(group) {
		let links = [];
		for (const [name, nationalities] of App.Data.NationalityPresets[group]) {
			links.push(App.UI.link(name, () => V.nationalities = nationalities, [], passage()));
		}
		return links.join(" | ");
	}
};

src/js/customizeSlaveTrade.js