@use 'sass:map';
@use '../core/tokens/m3-utils';
@use '../core/tokens/m3';

/// Generates custom tokens for the mtx-grid.
@function get-tokens($theme: m3.$sys-theme) {
  $system: m3-utils.get-system($theme);

  $tokens: (
    base: (
      grid-container-shape: map.get($system, corner-medium),
      grid-table-cell-min-width: 80px,
    ),
    color: (
      grid-outline-color: map.get($system, outline-variant),
      grid-column-menu-text-color: map.get($system, on-surface-variant),
      grid-column-menu-divider-color: map.get($system, outline-variant),
      grid-table-footer-background-color: map.get($system, surface-container),
      grid-table-row-striped-background-color: map.get($system, surface-container),
      grid-table-row-hover-background-color: map.get($system, secondary-container),
      grid-table-row-selected-background-color: map.get($system, secondary-container),
      grid-table-row-selected-hover-background-color: map.get($system, primary-container),
      grid-table-cell-selected-outline-color: map.get($system, primary),
      grid-resizable-handle-active-background-color: map.get($system, primary),
      grid-resizable-handle-hover-background-color: map.get($system, primary),
      grid-resizable-handle-disabled-background-color: map.get($system, outline-variant),
    ),
    typography: (),
    density: (
      grid-row-expand-button-size: 40px
    ),
  );

  @return $tokens;
}
