/**
 * @license
 * Copyright Tyler Technologies, Inc. 
 * License: Apache-2.0
 */
@use 'sass:map';
@use '../core/config';
@use '../tokens/border/tokens';
@use '../theme';
@use '../utils';

///
/// Emits custom property declarations for all border theme tokens.
/// 
@mixin properties {
  @each $token-name, $token-value in tokens.$tokens {
    @include utils.declare-var(border, $token-name, $token-value);
  }
}

///
/// Gets a CSS custom property declaration for a specific border token with its token value as the fallback value.
/// 
/// Example:
/// ```scss
/// .my-class {
///   @include border.style(standard); // => border: var(--forge-border-standard, 1px solid var(--forge-theme-outline));
/// }
/// ```
/// 
@mixin style($type, $style: solid, $prefix: config.$prefix) {
  border: value($type, $style, $prefix);
}

///
/// Gets a CSS custom property declaration for a specific border token with its token value as the fallback value.
/// 
@function variable($key, $prefix: config.$prefix) {
  @return utils.variable(border, tokens.$tokens, $key, $prefix);
}

///
/// Generates CSS custom property declarations for the provided spacing tokens.
/// 
@mixin provide($tokens, $prefix: config.$prefix) {
  @include utils.provide(tokens.$tokens, $tokens, border, $prefix);
}
