<commit_before>import {Component, ElementRef, Host, Input} from '@angular/core';
import {SwingStackComponent} from './swing-stack-component';
import {Card} from './swing';

@Component({
  selector: '[swing-card]',
  template: `
    <ng-content></ng-content>
  `
})
export class SwingCardComponent {
  @Input() prepend: boolean = false;

  constructor(
    private elmentRef: ElementRef,
    private swingStack: SwingStackComponent) {
  }

  ngOnInit() {
    this.swingStack.addCard(this, this.prepend);
  }

  getElementRef() {
    return this.elmentRef;
  }

  getNativeElement() {
    return this.elmentRef.nativeElement;
  }

  getCard(): Card {
    return this.swingStack.stack.getCard(this.getNativeElement());
  }
}<commit_msg>adding destoryCard function to swing-card-component<commit_after>import {Component, ElementRef, Host, Input} from '@angular/core';
import {SwingStackComponent} from './swing-stack-component';
import {Card} from './swing';

@Component({
  selector: '[swing-card]',
  template: `
    <ng-content></ng-content>
  `
})
export class SwingCardComponent {
  @Input() prepend: boolean = false;

  constructor(
    private elmentRef: ElementRef,
    private swingStack: SwingStackComponent) {
  }

  ngOnInit() {
    this.swingStack.addCard(this, this.prepend);
  }

  getElementRef() {
    return this.elmentRef;
  }

  getNativeElement() {
    return this.elmentRef.nativeElement;
  }

  getCard(): Card {
    return this.swingStack.stack.getCard(this.getNativeElement());
  }

  destroyCard() {
		this.swingStack.cards.pop();
		var card = this.swingStack.stack.getCard(this.getNativeElement());
		this.swingStack.stack.destroyCard(card);
	}
}
{'fraction_non_alphanumeric': 0.14140203714799282, 'fraction_numerical': 0.0, 'mean_word_length': 4.122699386503068, 'pattern_counts': {'":': 0, '<': 7, '<?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': '2823309', 'n_tokens_mistral': 548, 'n_tokens_neox': 530, 'n_words': 104}