/* ============================================================================== */
/*  S t a r k   M e s s a g e   P a n e                                           */
/* ============================================================================== */
/* stark-ui: src/modules/message-pane/components/message-pane-theme.scss */

@use "sass:map";
@use "@angular/material" as mat;

@mixin stark-message-pane-color($color) {
  .stark-message-pane-item {
    color: rgba($color: $color, $alpha: 0.87);
  }

  .mat-icon-button:not([disabled]) mat-icon {
    color: rgba($color: $color, $alpha: 0.87);
  }

  .mat-icon {
    fill: rgba($color: $color, $alpha: 0.87);
  }
}

@mixin stark-message-pane-theme($material-theme-config, $stark-theme-config) {
  .stark-message-pane {
    @include stark-message-pane-color(mat.get-color-from-palette(map.get($stark-theme-config, grey-palette), 800));

    .inner {
      color: mat.get-color-from-palette(mat.$light-theme-background-palette, background);
      background-color: mat.get-color-from-palette(mat.$light-theme-background-palette, background);
    }

    .summary {
      button.active::after {
        background-color: mat.get-color-from-palette(map.get($material-theme-config, accent), 500);
      }

      b {
        color: mat.get-color-from-palette(map.get($stark-theme-config, grey-palette), 900);
      }
    }

    .errors > mat-icon {
      fill: mat.get-color-from-palette(map.get($stark-theme-config, alert-palette), 500);
    }

    .warnings > mat-icon {
      fill: mat.get-color-from-palette(map.get($material-theme-config, warn), 500);
    }

    .infos > mat-icon {
      fill: mat.get-color-from-palette(map.get($material-theme-config, primary), 500);
    }
  }

  .stark-message-pane {
    &.stark-white {
      @include stark-message-pane-color(mat.get-color-from-palette(map.get($stark-theme-config, grey-palette), A100));
    }
  }
}
