UNPKG

@larva.io/webcomponents

Version:

Fentrica SmartUnits WebComponents package

29 lines (25 loc) 2.36 kB
/*! * (C) Fentrica http://fentrica.com - Seee LICENSE.md */ import { r as registerInstance, c as createEvent, h } from './index-C4h1muVj.js'; import { C as CallStatus } from './kone-elevators-interface-BV4-Ogt5.js'; const koneElevatorsCss = "slot-fb[hidden],slot[hidden]{display:initial !important}lar-button-group{-ms-flex-pack:center;justify-content:center}h2{text-align:center}"; const KoneElevatorsContent = class { constructor(hostRef) { registerInstance(this, hostRef); this.callelevator = createEvent(this, "callelevator"); this.callableAreas = []; this.connection = true; } render() { const buttons = this.callableAreas.map(area => h("lar-button", { expand: "full", disabled: this.loading || !!this.callStatus || !this.connection, onClick: () => this.callelevator.emit(area.id), color: this.color }, h("lar-translate", { t: area.name }))); return [ h("h2", { key: '43de6eb372c75030b0e50722e97a07fdf9e3d2d4' }, (this.callStatus === CallStatus.APPROVED || this.callStatus === CallStatus.CREATED) && h("span", { key: 'f9f2293e7ae64d619cd402854ef687f57f68fe64' }, h("lar-translate", { key: '1aefd8860b51cc9e03e52898d72e012662181144', t: "elevators.on_way" })), this.callStatus === CallStatus.CANCELLED && h("span", { key: 'a46ea9dd5f02024ef9b86d1cd6341f798bf49218' }, h("lar-translate", { key: 'ba3e89df4c231d1e5f10b677a729614e04f4e395', t: "elevators.call_canceled" })), this.callStatus === CallStatus.TIMEOUT && h("span", { key: '779577b178a17244df4a0ef2c7e08da9dbbcf93c' }, h("lar-translate", { key: '24eae886380bb2dcb702f0d823419281d0840977', t: "elevators.call_timeout" })), "\u00A0", !this.connection && h("span", { key: 'd3ddf96f524ac9eda74a555aa7e7128dcc8e898b', class: "error" }, h("lar-translate", { key: 'e2c851e55416d25d3db2f57aa0f63d8ac5b9a396', t: this.connectionError }))), h("lar-list-header", { key: 'e50d7554e1d8c86b87cefa3bdb63e74ff8c7a903' }, buttons.length > 0 && h("lar-translate", { key: '2c50d166eecde751f60974ce0344fb3080393c92', t: "elevators.callto" })), h("lar-button-group", { key: 'a37b9aa556ed858c5a1dab5ef0b88818c5ec0f2d' }, buttons) ]; } }; KoneElevatorsContent.style = koneElevatorsCss; export { KoneElevatorsContent as lar_kone_elevators_content }; //# sourceMappingURL=lar-kone-elevators-content.entry.js.map