import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
import {SvgKeyboardKey} from './keys/svg-keyboard-key.model';
import {SvgKeyboardKeyComponent} from './keys/svg-keyboard-key.component';
import {KeyAction} from '../../config-serializer/config-items/KeyAction';
@Component({
selector: 'g[svg-module]',
template:
`
`,
styles:
[`
:host {
position: relative;
}
`],
directives: [SvgKeyboardKeyComponent]
})
export class SvgModuleComponent implements OnInit {
@Input() coverages: any[];
@Input() keyboardKeys: SvgKeyboardKey[];
@Input() keyActions: KeyAction[];
@Output() editKeyActionRequest = new EventEmitter();
constructor() {
this.keyboardKeys = [];
}
ngOnInit() { }
onKeyClick(index: number): void {
this.editKeyActionRequest.emit(index);
}
}