import { Component, Input } from '@angular/core';
import { UtilsService } from '~/core/services/utils.service';

@Component({
    moduleId: module.id,
    selector: 'AddressBlock',
    templateUrl: './address-block.component.html',
    styleUrls: ['./_address-block.component.scss']
})
export class AddressBlockComponent {
    @Input() label: string;
    @Input() firstLine?: string;
    @Input() street: string;
    @Input() city: string;
    @Input() state: string;
    @Input() postcode: string;

    constructor(
        private utils: UtilsService
    ) {
    }

    openAddress() {
        this.utils.openAddress(this.street, this.postcode, this.city, this.state);
    }
}
