import { c as l } from "../../chunks/runtime.js";
import { css as r, html as i } from "lit";
import { classes as c } from "@arcgis/toolkit/dom";
import { LitElement as p, safeClassMap as n } from "@arcgis/lumina";
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
v4.34.7 */
const d = r`.arcgis-print__export-section--centered{text-align:center}.arcgis-print__panel-container{display:flex;flex:1 0;flex-direction:column;gap:var(--calcite-spacing-sm)}.arcgis-print__exported-files-empty{display:flex;flex-direction:column;align-items:center;padding:var(--calcite-spacing-lg) var(--calcite-spacing-sm);font-size:small}.arcgis-print__export-title{font-weight:700;font-size:var(--calcite-font-size)}`, e = "arcgis-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 x extends p {
  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, o = {
      [t.exportSectionCentered]: !s.length
    };
    return i`<section class=${n(c(t.exportSection, o))} role=tabpanel><div class=${n(t.panelContainer)}>${s.length === 0 ? i`<div class=${n(t.exportedFilesEmpty)}><calcite-icon icon=file scale=l></calcite-icon><div><p class=${n(t.exportedFilesTitle)}>${this.messages.noExportedFiles}</p><div>${this.messages.exportHint}</div></div></div>` : i`<calcite-list .filterEnabled=${s.length > 10} .label=${this.messages.exportedLinksList} selection-mode=none>${s.map((a) => i`<arcgis-print-exported-link .exportedLink=${a} .viewModel=${this.viewModel} .messages=${this.messages} .allowedFormatsForSaving=${this.allowedFormatsForSaving} .saveAsButtonCallback=${this.saveAsButtonCallback}></arcgis-print-exported-link>`)}</calcite-list>`}</div></section>`;
  }
}
l("arcgis-print-exports-panel", x);
export {
  x as PrintExportsPanel
};
