/**
 * @license MIT
 * author: Cube Dev Team
 * @cube-dev/ui-kit v0.0.0-canary-d4047d7
 * Released under the MIT license.
 */

import { parseStyle } from '../utils/styles.js';
function toBoxShadow(shadow) {
    const processed = parseStyle(shadow);
    const { values, mods, colors } = processed.groups[0] ?? { values: [], mods: [], colors: [] };
    const mod = mods[0] || '';
    const shadowColor = (colors && colors[0]) ?? '';
    return [mod, ...values, shadowColor].join(' ');
}
export function shadowStyle({ shadow }) {
    if (!shadow)
        return;
    if (shadow === true)
        shadow = 'var(--card-shadow)';
    return {
        'box-shadow': shadow.split(',').map(toBoxShadow).join(','),
    };
}
shadowStyle.__lookupStyles = ['shadow'];

        