/**
 * Small utility for adding Stencil component scope to dynamically inserted elements
 * (e.g. svg for title logotypes)
 */
export function applyStencilScope(host, root) {
    const scopeClasses = [...host.classList].filter(c => c.startsWith('sc-'));
    if (!scopeClasses.length)
        return;
    root.classList.add(...scopeClasses);
    root.querySelectorAll('*').forEach(el => {
        el.classList.add(...scopeClasses);
    });
}
