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

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

  mtna-file-upload {
    .error {
      color: mat.get-color-from-palette($warn);
    }
    .outer {
      color: mat.get-color-from-palette($foreground, secondary-text);
      border-color: mat.get-color-from-palette($foreground, secondary-text);
      &.drag-over {
        border-color: mat.get-color-from-palette($primary, default);
        .normal-label,
        .small-label {
          border-color: mat.get-color-from-palette($primary, default);
          color: mat.get-color-from-palette($primary, default);
        }
      }
    }
  }
}

@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);
  }
}
