/**
 * Create the mode and color classes for the component based on the classes passed in
 */
function createColorClasses(color) {
    return (typeof color === 'string' && color.length > 0) ? {
        'lu-color': true,
        [`lu-color-${color}`]: true
    } : undefined;
}
function hostContext(selector, el) {
    return el.closest(selector) !== null;
}
const getClassList = (classes) => {
    if (classes !== undefined) {
        const array = Array.isArray(classes) ? classes : classes.split(' ');
        return array
            .filter(c => c != null)
            .map(c => c.trim())
            .filter(c => c !== '');
    }
    return [];
};
const getClassMap = (classes) => {
    const map = {};
    getClassList(classes).forEach(c => map[c] = true);
    return map;
};

export { createColorClasses as c, getClassMap as g, hostContext as h };

//# sourceMappingURL=theme-a8bb96f5.js.map