import { Component, OnInit }        from '@angular/core'
import { Location }                 from '@angular/common'

import { ActivatedRoute, Params }   from '@angular/router'

import { HelperService }            from '../../../services/svc.helper'
import { SeoService }               from '../../../services/svc.seo'
import { PageService }              from '../../../services/svc.page'


@Component({
    moduleId: module.id+ '',
    selector: 'studio-contact',
    templateUrl: './tpl.studio-contact.pug'
})

export class StudioContactView implements OnInit {

    pageContent: any

    constructor(
        private _page: PageService,
        private _helper: HelperService,
        private _seo: SeoService,

        private route: ActivatedRoute,
        private location: Location
    ) {}

    ngOnInit() {
        this._page.getPageContent(this.location.path().substring(1)).then(response => {
            this.pageContent = response

            // Set SEO
            this._seo.setTitle(response.meta.title);
            this._seo.updateTag('description', response.meta.description);
        })

    }
    gatherReceiver(id, identifier) {
        return { "id": id, "identifier": identifier }
    }

}
