export function setViewTransitionStyles() {
    const blocks = Array.from(document.querySelectorAll("section[data-template]"));
    blocks.forEach((element, i) => {
        element.style.setProperty("view-transition-name", `t-${i.toString().padStart(5, "0")}`);
    });
}
export function removeViewTransitionStyles() {
    const delay = getViewTransitionDuration();
    setTimeout(() => {
        const blocks = Array.from(document.querySelectorAll("section[data-template]"));
        blocks.forEach((element) => {
            element.style.removeProperty("view-transition-name");
        });
    }, delay);
}
export function getViewTransitionDuration() {
    const bodyStyles = window.getComputedStyle(document.body);
    const viewTransitionDuration = bodyStyles.getPropertyValue("--eden-view-transition-duration");
    return parseInt(viewTransitionDuration, 10);
}
