import { Component, OnInit, Input } from '@angular/core';
import { DataSource } from './../../../core/models/data-source.model';
import { DataService } from './../../../services/data.service';
import { SourceAnimation } from './data-source.animations';

@Component({
  selector: 'data-source',
  template: require('./data-source.component.html'),
	styleUrls: ['./data-source.scss'],
  animations:[SourceAnimation]
})
export class DataSourceComponent {

	@Input() source: DataSource;

	constructor() { }

	ngOnInit(){
		if(!this.source){
			this.source = {
				name: "Unkown",
				url:"https://de.wikipedia.org",
				license:""
			}
		}
	}
}
