@use 'sass:map';
@use '~@angular/material' as mat;

@mixin color($theme) {
  $config: mat.get-color-config($theme);
  $background: map.get($config, background);
  $foreground: map.get($config, foreground);

  rds-c-stepper {
    .mat-stepper-horizontal {
      background-color: transparent;
    }

    .rds-c-stepper-action-buttons,
    .mat-horizontal-stepper-header-container {
      background-color: mat.get-color-from-palette($background, status-bar, 0.12);
    }

    .mat-step-icon {
      border-radius: 4px;
    }

    .mat-step-header .mat-step-icon:not(.mat-step-icon-selected):not(.mat-step-icon-state-done),
    .rds-c-stepper-back-button.mat-mini-fab,
    .rds-c-stepper-back-button.mat-mini-fab.mat-accent {
      background-color: mat.get-color-from-palette($background, unselected-chip);
      color: mat.get-color-from-palette($foreground, text);
    }
  }
}

@mixin typography($theme) {
}

@mixin theme($theme) {
  $config: mat.get-color-config($theme);
  @if $config != null {
    @include color($theme);
  }

  $typography-config: mat.get-typography-config($theme);
  @if $typography-config != null {
    @include typography($theme);
  }
}
