blob: a65283dd8fbf1bc20c28e4225b3ecf29895460bd [file] [log] [blame]
import { View } from 'libs/mvc/view'
/*
* View representing the state and interaction for publishing the p2b service.
* @class
* @extends {View}
*/
export class StatusView extends View {
constructor(serviceState) {
var el = document.createElement('p2b-status');
el.serviceState = serviceState;
super(el);
}
/*
* Event representing user's intention to stop the published service
* @event
*/
onStopAction(eventHandler) {
this.element.addEventListener('stop', () => {
eventHandler();
});
}
}