/**
* VMK UI Kit browser progress helper.
*
* Simple utility to update .progress-bar widths.
*/
function setValue(element, value, max = 100) {
const progress = typeof element === "string" ? document.querySelector(element) : element;
if (!progress) return;
const bar = progress.querySelector(".progress-bar");
if (!bar) return;
const percentage = Math.max(0, Math.min(100, (value / max) * 100));
bar.style.width = `${percentage}%`;
bar.setAttribute("aria-valuenow", String(value));
bar.setAttribute("aria-valuemax", String(max));
}
export default {
setValue
};