import { h } from '../edel-elements.core.js';

function applyInputgroupStyle(inGroup, hostElement) {
    if (inGroup === true ||
        (inGroup === undefined &&
            hostElement.parentElement &&
            (hostElement.parentElement.tagName.toLowerCase() === 'edel-inputgroup' ||
                hostElement.parentElement.classList.contains('inputgroup')))) {
        hostElement.classList.add('inputgroup-field');
    }
    else {
        hostElement.classList.remove('inputgroup-field');
    }
}

export { applyInputgroupStyle as a };
