package com.realnet.OpenAi.Renders;

import java.util.Arrays;
import java.util.List;
import java.util.Map;

public class FooterRenderer {

	@SuppressWarnings("unchecked")
	public static String render(Map<String, Object> json) {
		List<String> links = (List<String>) json.get("footerLinks");
		List<String> legalLinks = (List<String>) json.get("legalLinks");

		StringBuilder sb = new StringBuilder();
		sb.append("<footer class='footer-1'>");

		sb.append("<div class='footer-top'>").append("<img class='logo-1' src='' alt='Logo'>")
				.append("<nav class='footer-nav'><ul>");
		if (links != null) {
			for (String link : links) {
				sb.append("<li><a href='#'>").append(link).append("</a></li>");
			}
		}
		sb.append("</ul></nav>");

		sb.append("<div class='footer-social'>").append("<div></div><div></div><div></div>").append("</div></div>");

		sb.append("<div class='footer-bottom'>").append("<span>© 2025 Relume. All rights reserved.</span>")
				.append("<ul class='footer-legal'>");

		if (legalLinks != null) {
			for (String legal : legalLinks) {
				sb.append("<li><a href='#'>").append(legal).append("</a></li>");
			}
		}

		sb.append("</ul></div>");
		sb.append("</footer>");

		return sb.toString();
	}
}
