import { c as a } from "../../chunks/runtime.js";
import { html as r } from "lit-html";
import { LitElement as l, noShadowRoot as n } from "@arcgis/lumina";
/*! All material copyright GeoScene, All Rights Reserved, unless otherwise specified.
See https://js.geoscene.cn/4.33/geoscene/copyright.txt for details.
v4.33.18 */
class c extends l {
  static {
    this.properties = { viewModel: 0, messages: 0, fileName: 1, selectExportsTab: 0 };
  }
  static {
    this.shadowRootOptions = n;
  }
  loaded() {
    this.manager.onLifecycle(() => []);
  }
  async _handlePrintMap() {
    this.viewModel.export(this.fileName || this.messages.untitled), this.selectExportsTab();
  }
  render() {
    const { messages: t } = this, { layout: e, layoutItem: i, format: s } = this.viewModel.templateOptions, o = this.viewModel.state !== "ready" || !(e || i);
    return r`<div><calcite-button .ariaLabel=${t.exportDescription} .disabled=${o || !(e || i?.id) && !s} @click=${this._handlePrintMap} scale=l width=full>${t.export}</calcite-button></div>`;
  }
}
a("geoscene-print-export-button", c);
export {
  c as PrintExportButton
};