<commit_before>import { inject, customElement } from 'aurelia-framework';
import { getLogger, Logger } from 'aurelia-logging';
import * as drawerCommon from './common';
import * as util from '../util';

@customElement('mdc-drawer-header')
@inject(Element)
export class MdcDrawerHeader {
  private log: Logger;

  private elementHeader: HTMLElement;
  private elementContent: HTMLElement;

  constructor(private element: Element) {
    this.log = getLogger('mdc-drawer-header');
  }

  private bind() { /** */ }
  private unbind() { /** */ }

  private attached() {
    if (drawerCommon.isPermanentDrawer(this.element)) {
      this.elementHeader.classList.add('mdc-permanent-drawer__header');
      this.elementContent.classList.add('mdc-permanent-drawer__header-content');
    }
    if (drawerCommon.isPersistentDrawer(this.element)) {
      this.elementHeader.classList.add('mdc-persistent-drawer__header');
      this.elementContent.classList.add('mdc-persistent-drawer__header-content');
    }
    if (drawerCommon.isTemporaryDrawer(this.element)) {
      this.elementHeader.classList.add('mdc-temporary-drawer__header');
      this.elementContent.classList.add('mdc-temporary-drawer__header-content');
    }
  }
}<commit_msg>fix(mdc-drawer-header): correctly detect parent drawer type<commit_after>import { customElement } from 'aurelia-framework';
import { getLogger, Logger } from 'aurelia-logging';
import * as drawerCommon from './common';
import * as util from '../util';

@customElement('mdc-drawer-header')
export class MdcDrawerHeader {
  private log: Logger;

  private elementHeader: HTMLElement;
  private elementContent: HTMLElement;

  constructor() {
    this.log = getLogger('mdc-drawer-header');
  }

  private bind() { /** */ }
  private unbind() { /** */ }

  private attached() {
    if (drawerCommon.isPermanentDrawer(this.elementHeader)) {
      this.elementHeader.classList.add('mdc-permanent-drawer__header');
      this.elementContent.classList.add('mdc-permanent-drawer__header-content');
    }
    if (drawerCommon.isPersistentDrawer(this.elementHeader)) {
      this.elementHeader.classList.add('mdc-persistent-drawer__header');
      this.elementContent.classList.add('mdc-persistent-drawer__header-content');
    }
    if (drawerCommon.isTemporaryDrawer(this.elementHeader)) {
      this.elementHeader.classList.add('mdc-temporary-drawer__header');
      this.elementContent.classList.add('mdc-temporary-drawer__header-content');
    }
  }
}
{'fraction_non_alphanumeric': 0.13818181818181818, 'fraction_numerical': 0.0, 'mean_word_length': 4.453744493392071, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3922005', 'n_tokens_mistral': 775, 'n_tokens_neox': 779, 'n_words': 115}