@use 'sass:map';
@use '../base/colors';
@use '../base/opacity' as op;

@mixin mx-list-theme($theme) {
  $is-dark: map.get($theme, is-dark);
  $color-theme: colors.$mx-light;

  @if $is-dark == true {
    $color-theme: colors.$mx-dark;
  }

  mx-list-item + mx-list-item {
    .mx-list-item:not(.hide-border) {
      border-top: 1px solid map.get($color-theme, outlineVariant);
    }
  }

  mx-list-item:active {
    .mx-list-item:not(.disabled) {
      .mx-list-item--ripple {
        background-color: rgba(map.get($color-theme, onSurface), op.$opacity-12);
      }
    }
  }
}
