export function injectStyles(id, styles) {
    const existingStyles = document.getElementById(id);
    const allStyles = styles.join("");
    if (existingStyles)
        return (existingStyles.innerHTML = allStyles);
    document.head.appendChild(Object.assign(document.createElement("style"), {
        id,
        innerHTML: allStyles,
    }));
}
