(function () {
	"use strict";

	document.addEventListener("DOMContentLoaded", function () {
		document.querySelectorAll(".aetheris-toggle-visibility").forEach(function (btn) {
			btn.addEventListener("click", function () {
				var id = btn.getAttribute("data-target");
				if (!id) return;
				var input = document.getElementById(id);
				if (!input) return;
				input.type = input.type === "password" ? "text" : "password";
			});
		});
	});
})();
