@charset "UTF-8";

/// Sets a value to/from a configuration path
///
/// @param {String} $key     The configuration key
/// @param {*}      $value   The value to set
/// @param {Bool}   $default Whether the configuration is default
///
/// @return         {*}      The value of the configuration path
@function config-set($key, $value, $default: false) {
  $key: $config-namespace + $key;

  @if $default {
    @if config-map-has($config-default, $key) {
      $value: config-map-get($config-default, $key);
    } @else {
      $config-default: config-map-set($config-default, $key, $value) !global;
    }
  } @else {
    $config-attr: config-map-set($config-attr, $key, $value) !global;
  }

  @return $value;
}

@charset "UTF-8";

/// Sets a value to/from a configuration path
///
/// @param {String} $key     The configuration key
/// @param {*}      $value   The value to set
/// @param {Bool}   $default Whether the configuration is default
///
/// @return         {*}      The value of the configuration path
@function config-set($key, $value, $default: false) {
  $key: $config-namespace + $key;

  @if $default {
    @if config-map-has($config-default, $key) {
      $value: config-map-get($config-default, $key);
    } @else {
      @if ($config-manger-variables == 'global') {
        $config-default: config-map-set($config-default, $key, $value) !global;
      } @else {
        $config-default: config-map-set($config-default, $key, $value);
      }
    }
  } @else {
    @if ($config-manger-variables == 'global') {
      $config-attr: config-map-set($config-attr, $key, $value) !global;
    } @else {
      $config-attr: config-map-set($config-attr, $key, $value);
    }
  }

  @return $value;
}

Update config-set() to respect $config-manger-variables
Update config-set() to respect $config-manger-variables