@use '@angular/material' as mat;
@import '../themes/material-typography';

:root {
  --text-headline-6: #{mat.font-size($custom-typography-config, 'headline-6')};
  --text-headline-5: #{mat.font-size($custom-typography-config, 'headline-5')};
  --text-body-1: #{mat.font-size($custom-typography-config, 'body-1')};
  --text-body-2: #{mat.font-size($custom-typography-config, 'body-2')};
  --text-weight-body-1: #{mat.font-weight($custom-typography-config, 'body-1')};
  --text-caption: #{mat.font-size($custom-typography-config, 'caption')};
}

.text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-nowrap {
  white-space: nowrap;
}

.text-center {
  text-align: center;
}

@mixin set-text-styles($palette, $warn-palette, $foreground) {
  $black-color: black;
  $text-color: mat.get-color-from-palette($foreground, text);
  $text-secondary-color: mat.get-color-from-palette($foreground, secondary-text);
  $text-link-hover-color: mat.get-color-from-palette($foreground, text-link-hover);
  $text-error-color: mat.get-color-from-palette($warn-palette, 600);

  .text-gray {
    color:$text-secondary-color;
  }
  
  .text-primary {
    color: $text-color;
  }

  .text-error {
    color: $text-error-color;
  }
  
  *.text-secondary,
  *.text-muted {
    color: $text-secondary-color;
  }
  
  a.text-secondary {
    &:focus {
      color: $text-secondary-color;
    }
    &:hover {
      color: $text-link-hover-color;
    }
  }
}
