import {Component} from '@angular/core';
import {PiwikHelper} from '../../utils/piwikHelper';
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
import {properties} from "../../../environments/environment";

@Component({
  selector: 'openaire-htmlProjectReport',
  template: `
    <htmlProjectReport [piwikSiteId]=piwikSiteId [communityId]="communityId"></htmlProjectReport>`,
})
export class OpenaireHtmlProjectReportComponent {
  piwikSiteId;
  communityId;
  
  constructor() {
  }
  
  ngOnInit() {
    this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
    this.piwikSiteId = PiwikHelper.getSiteId(this.communityId, properties.environment);
  }
}
