<commit_before>import { bindable, customElement } from 'aurelia-framework';
import * as util from '../util';

@customElement('mdc-card-title')
export class MdcCardTitle {
  @bindable() public class: string;
  @bindable() public title: string;
  @bindable() public subtitle: string;
  @bindable() public large = true;
  private showTitle = true;
  private showSubtitle = true;
  private showLarge = true;
  private elementPrimary: HTMLElement;
  private isAvatar;

  private attached() {
    if (!this.isAvatar) {
      const avatarElement = this.elementPrimary.firstChild as HTMLElement;
      if (avatarElement) {
        avatarElement.style.position = 'absolute';
      }
      this.elementPrimary.classList.add('mdc-mdc-card-avatar');
    }
    this.titleChanged(this.title);
    this.subtitleChanged(this.subtitle);
    this.largeChanged(this.large);
  }
  private titleChanged(newValue: string) {
    this.showTitle = false;
    this.showTitle = (newValue && newValue.length > 0);
  }
  private subtitleChanged(newValue: string) {
    this.showSubtitle = false;
    this.showSubtitle = (newValue && newValue.length > 0);
  }
  private largeChanged(newValue: boolean) {
    this.showLarge = util.getBoolean(newValue);
  }
}<commit_msg>fix(mdc-card-title): card error using avatar icon<commit_after>import { bindable, customElement } from 'aurelia-framework';
import * as util from '../util';

@customElement('mdc-card-title')
export class MdcCardTitle {
  @bindable() public class: string;
  @bindable() public title: string;
  @bindable() public subtitle: string;
  @bindable() public large = true;
  private showTitle = true;
  private showSubtitle = true;
  private showLarge = true;
  private elementPrimary: HTMLElement;
  private isAvatar;

  private attached() {
    if (!this.isAvatar) {
      const avatarElement = this.elementPrimary.firstElementChild as HTMLElement;
      if (avatarElement) {
        avatarElement.style.position = 'absolute';
      }
      this.elementPrimary.classList.add('mdc-mdc-card-avatar');
    }
    this.titleChanged(this.title);
    this.subtitleChanged(this.subtitle);
    this.largeChanged(this.large);
  }

  private titleChanged(newValue: string) {
    this.showTitle = false;
    this.showTitle = (newValue && newValue.length > 0);
  }

  private subtitleChanged(newValue: string) {
    this.showSubtitle = false;
    this.showSubtitle = (newValue && newValue.length > 0);
  }

  private largeChanged(newValue: boolean) {
    this.showLarge = util.getBoolean(newValue);
  }
}
{'fraction_non_alphanumeric': 0.12083993660855784, 'fraction_numerical': 0.001584786053882726, 'mean_word_length': 3.8651252408477843, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '1658938', 'n_tokens_mistral': 793, 'n_tokens_neox': 785, 'n_words': 173}