import { Component, OnInit } from '@angular/core';
import { CurrentDeviceService } from '@iotize/ionic';
import { ToastService } from 'app-theme';

@Component({
  selector: '<%= dasherize(name) %>',
  templateUrl: './<%= dasherize(name) %>.component.html',
  styleUrls: ['./<%= dasherize(name) %>.component.scss'],
})
export class <%= classify(name) %>Component implements OnInit {
  
  <%= renderEngine.renderTS('declaration', content) %>

  public get tap(){
    return this.tapService.tap;
  }

  constructor(
    private tapService: CurrentDeviceService
    , private toastService: ToastService) {

  }

  async ngOnInit() {
    <%= renderEngine.renderTS('init', content) %>
  }

  private onError(err: Error) {
    this.toastService.error(err);
  }

}
