import { c as l } from "../../chunks/runtime.js";
import { html as i } from "lit-html";
import { classes as r } from "@arcgis/components-utils";
import { LitElement as c, safeClassMap as o } from "@arcgis/lumina";
import { css as p } from "@lit/reactive-element/css-tag.js";
/*! 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 */
const d = p`.geoscene-print__export-section--centered{text-align:center}.geoscene-print__panel-container{display:flex;flex:1 0;flex-direction:column;gap:var(--calcite-spacing-sm)}.geoscene-print__exported-files-empty{display:flex;flex-direction:column;align-items:center;padding:var(--calcite-spacing-lg) var(--calcite-spacing-sm);font-size:small}.geoscene-print__export-title{font-weight:700;font-size:var(--calcite-font-size)}`, e = "geoscene-print", t = {
  exportSection: `${e}__export-section`,
  panelContainer: `${e}__panel-container`,
  exportedFilesEmpty: `${e}__exported-files-empty`,
  exportedFilesTitle: `${e}__export-title`,
  exportSectionCentered: `${e}__export-section--centered`
};
class m extends c {
  static {
    this.properties = { saveAsButtonCallback: 0, viewModel: 0, messages: 0, allowedFormatsForSaving: 1 };
  }
  static {
    this.styles = d;
  }
  loaded() {
    this.manager.onLifecycle(() => [this.viewModel.exportedLinks.on("change", () => this.requestUpdate())]);
  }
  render() {
    const s = this.viewModel.exportedLinks, n = {
      [t.exportSectionCentered]: !s.length
    };
    return i`<section class=${o(r(t.exportSection, n))} role=tabpanel><div class=${o(t.panelContainer)}>${s.length === 0 ? i`<div class=${o(t.exportedFilesEmpty)}><calcite-icon icon=file scale=l></calcite-icon><div><p class=${o(t.exportedFilesTitle)}>${this.messages.noExportedFiles}</p><div>${this.messages.exportHint}</div></div></div>` : i`<calcite-list .filterEnabled=${s.length > 10} .label=${this.messages.exportedLinksList}>${s.map((a) => i`<geoscene-print-exported-link .exportedLink=${a} .viewModel=${this.viewModel} .messages=${this.messages} .allowedFormatsForSaving=${this.allowedFormatsForSaving} .saveAsButtonCallback=${this.saveAsButtonCallback}></geoscene-print-exported-link>`)}</calcite-list>`}</div></section>`;
  }
}
l("geoscene-print-exports-panel", m);
export {
  m as PrintExportsPanel
};