import { Component, OnInit } from '@angular/core';
import { AuthenticationService } from '../_services/index';

@Component({
    moduleId: module.id,
    selector: 'app-select-code',
    templateUrl: 'select-code.component.html',
    styleUrls: ['select-code.component.scss']
})

export class SelectCodeComponent implements OnInit {
    public clients: any;
    public currentClient: any;

    constructor(
        private auth: AuthenticationService
    ) { }

    ngOnInit() {
        this.clients = this.auth.getClients();
        this.currentClient = this.auth.getCurrentClient();
    }

    changeClient() {
        this.auth.setCurrentClient(this.currentClient);
    }
}
