/**
 * @license
 * Copyright Tyler Technologies, Inc. 
 * License: Apache-2.0
 */
@use 'sass:map';
@use '../../../utils';
@use '../../../theme';
@use '../../../shape';
@use '../../../spacing';
@use '../../../typography';

$tokens: (
  // Base
  background: utils.module-val(list-item, background, transparent),
  shape: utils.module-val(list-item, shape, 0),
  padding: utils.module-val(list-item, padding, 0 spacing.variable(medium)),
  margin: utils.module-val(list-item, margin, 0),
  height: utils.module-val(list-item, height, 48px),
  dense-height: utils.module-val(list-item, dense-height, 32px),
  indent: utils.module-val(list-item, indent, spacing.variable(xxlarge)),
  cursor: utils.module-val(list-item, cursor, pointer),
  gap: utils.module-val(list-item, gap, spacing.variable(large)),

  // Supporting text
  text-color: utils.module-val(list-item, text-color, theme.variable(text-medium)),
  text-font-size: utils.module-val(list-item, text-font-size, typography.variable(body2, font-size)),
  text-font-weight: utils.module-val(list-item, text-font-weight, typography.variable(body2, font-weight)),
  text-line-height: utils.module-val(list-item, text-line-height, typography.scale('1500')),

  // Selected
  selected-color: utils.module-val(list-item, selected-color, theme.variable(primary)),
  selected-opacity: utils.module-val(list-item, selected-opacity, theme.emphasis(lowest)),
  selected-leading-color: utils.module-ref(list-item, selected-leading-color, selected-color),
  selected-trailing-color: utils.module-ref(list-item, selected-trailing-color, selected-color),
  selected-text-color: utils.module-val(list-item, selected-text-color, theme.variable(text-medium)),

  // Disabled
  disabled-opacity: utils.module-val(list-item, disabled-opacity, theme.emphasis(medium-low)),
  disabled-cursor: utils.module-val(list-item, disabled-cursor, not-allowed),

  // Line variants
  one-line-height: utils.module-ref(list-item, one-line-height, height),
  two-line-height: utils.module-val(list-item, two-line-height, utils.module-ref(list-item, height, 72px, value)),
  three-line-height: utils.module-val(list-item, three-line-height, utils.module-ref(list-item, height, 88px, value)),

  // Dense
  dense-one-line-height: utils.module-ref(list-item, dense-one-line-height, dense-height),
  dense-two-line-height: utils.module-val(list-item, dense-two-line-height, utils.module-ref(list-item, dense-height, 56px, value)),
  dense-three-line-height: utils.module-val(list-item, dense-three-line-height, utils.module-ref(list-item, dense-height, 72px, value)),
  dense-font-size: utils.module-val(list-item, dense-font-size, 0.875rem),
  dense-indent: utils.module-val(list-item, dense-indent, spacing.variable(xxlarge)),
  dense-gap: utils.module-val(list-item, dense-gap, spacing.variable(xsmall)),

  // Leading
  leading-selected-color: utils.module-ref(list-item, leading-selected-color, selected-color),

  // Trailing
  trailing-selected-color: utils.module-ref(list-item, trailing-selected-color, selected-color),

  // Wrap
  wrap-padding: utils.module-val(list-item, wrap-padding, spacing.variable(xsmall) spacing.variable(medium)),
) !default;

@function get($key) {
  @return map.get($tokens, $key);
}
