@arcgis/map-components
Version:
ArcGIS Map Components
31 lines (30 loc) • 1.07 kB
JavaScript
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
import { c as t } from "../../chunks/runtime.js";
import { html as i } from "lit";
import { watch as r } from "@arcgis/core/core/reactiveUtils.js";
import { LitElement as a } from "@arcgis/lumina";
class s extends a {
constructor() {
super(...arguments), this._showPrintAreaEnabled = !1;
}
static {
this.properties = { _showPrintAreaEnabled: 16, viewModel: 0, messages: 0 };
}
loaded() {
this.manager.onLifecycle(() => [
r(() => [this.viewModel.showPrintAreaEnabled], () => {
const { showPrintAreaEnabled: e } = this.viewModel;
this._showPrintAreaEnabled = e;
}, { initial: !0 })
]);
}
render() {
return i`<calcite-label layout=inline><calcite-switch .checked=${this._showPrintAreaEnabled} @calciteSwitchChange=${(e) => {
this.viewModel.showPrintAreaEnabled = !!e.currentTarget.checked;
}}></calcite-switch>${this.messages.printPreview}</calcite-label>`;
}
}
t("arcgis-print-preview-input", s);
export {
s as PrintPreviewInput
};