@use 'sass:meta';
@use '@tokens' as tokens;
@use '../tools/tokens' as tokens-tools;

$tokens: (
    gradient: tokens.$gradients,
    space: tokens.$spaces,
    container: tokens.$containers,
    grid: tokens.$grids,
    breakpoint: tokens.$breakpoints,
    radius: tokens.$radii,
    shadow: tokens.$shadows,
    typography: tokens.$styles,
);

:root {
    // Print all token values as CSS variables
    --spirit-border-width-0: #{tokens.$border-width-0};
    --spirit-border-width-100: #{tokens.$border-width-100};
    --spirit-border-width-200: #{tokens.$border-width-200};

    @each $key, $value in $tokens {
        @include tokens-tools.generate-css-variables($map: $value, $prefix: 'spirit-#{$key}');
    }
}
