@use "sass:meta";
@use "sass:string";
@use "variables" as *;

/// Get CSS variable with prefix
/// @param {String} $name - CSS variable name (without prefix)
/// @param {*} $fallback - Optional fallback value
/// @return {String} - Complete CSS variable reference
/// @example
///   color: fi-var(global-font-color);
///   background: fi-var(custom-bg, #fff);
@function fi-var($name, $fallback: null) {
  @if $fallback != null {
    @return var(#{$rootPrefix}#{$name}, $fallback);
  }

  @return var(#{$rootPrefix}#{$name});
}
