/*! 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 */
import{P as c,Q as a,U as p,a as r,j as o,k as i}from"./3VKC6PRK.js";var m=o`.geoscene-print__advanced-options-section{border:1px solid var(--calcite-color-border-1);margin-bottom:var(--calcite-spacing-sm)}.geoscene-print__map-only-section{padding:var(--calcite-spacing-sm) var(--calcite-spacing-sm)}.geoscene-print__panel-container{display:flex;flex:1 0;flex-direction:column;gap:var(--calcite-spacing-sm)}.geoscene-print__size-container{--button-width: 32px;display:inline-grid;grid-template-columns:1fr 1fr var(--button-width);column-gap:var(--calcite-spacing-xs);width:100%}.geoscene-print__swap-button{flex:1 0 auto;border:none;color:var(--calcite-color-border-input);align-self:flex-end;margin-bottom:var(--calcite-spacing-md)}.geoscene-print__swap-button calcite-button{width:var(--button-width);height:var(--button-width)}`,n="geoscene-print",s={advancedOptionsSection:`${n}__advanced-options-section`,mapOnlySection:`${n}__map-only-section`,panelContainer:`${n}__panel-container`,sizeContainer:`${n}__size-container`,swapButton:`${n}__swap-button`},l=class extends c{static{this.properties={viewModel:0,messages:0,selectExportsTab:0}}static{this.styles=m}loaded(){this.manager.onLifecycle(()=>[])}render(){return i`<section class=${a(s.mapOnlySection)} role=tabpanel><div class=${a(s.panelContainer)}>${this._renderFileNameInput()}${this._renderFileFormatSection()}${this._renderSizeSection()}${this._renderAdvancedSection()}${this._renderExportButton()}</div></section>`}_renderFileNameInput(){let{fileName:t,fileNamePlaceHolder:e}=this.messages;return i`<calcite-label>${t}<calcite-input .placeholder=${e} .value=${this.viewModel.templateOptions.fileName??""} @calciteInputInput=${d=>{this.viewModel.templateOptions.fileName=d.currentTarget.value}}></calcite-input></calcite-label>`}_renderFileFormatSection(){return i`<geoscene-print-format-select .viewModel=${this.viewModel} .messages=${this.messages}></geoscene-print-format-select>`}_renderSizeSection(){return i`<div><div class=${a(r(s.sizeContainer))}><calcite-label>${this.messages.width}<calcite-input-number .value=${`${this.viewModel.templateOptions.width}`} .max=${Number.MAX_SAFE_INTEGER} @calciteInputNumberInput=${t=>{let e=Number(t.target.value);!Number.isNaN(e)&&e>0&&Number.isFinite(e)?this.viewModel.templateOptions.width=e:t.target.value=`${this.viewModel.templateOptions.width}`}}></calcite-input-number></calcite-label><calcite-label>${this.messages.height}<calcite-input-number .value=${`${this.viewModel.templateOptions.height}`} .max=${Number.MAX_SAFE_INTEGER} @calciteInputNumberInput=${t=>{let e=Number(t.target.value);!Number.isNaN(e)&&e>0&&Number.isFinite(e)?this.viewModel.templateOptions.height=e:t.target.value=`${this.viewModel.templateOptions.height}`}}></calcite-input-number></calcite-label><div class=${a(s.swapButton)}><calcite-button icon-start=arrow-right-left .label=${this.messages.swap} appearance=transparent kind=neutral @click=${()=>{[this.viewModel.templateOptions.width,this.viewModel.templateOptions.height]=[this.viewModel.templateOptions.height,this.viewModel.templateOptions.width],this.requestUpdate()}}></calcite-button></div></div><geoscene-print-preview-input .viewModel=${this.viewModel} .messages=${this.messages}></geoscene-print-preview-input></div>`}_renderAdvancedSection(){return i`<calcite-block .ariaLabel=${this.messages.advancedOptions} class=${a(r(s.panelContainer,s.advancedOptionsSection))} collapsible .heading=${this.messages.advancedOptions}><geoscene-print-map-only-advanced-options .messages=${this.messages} .viewModel=${this.viewModel}></geoscene-print-map-only-advanced-options></calcite-block>`}_renderExportButton(){return i`<geoscene-print-export-button .fileName=${this.viewModel.templateOptions.fileName??void 0} .messages=${this.messages} .viewModel=${this.viewModel} .selectExportsTab=${this.selectExportsTab}></geoscene-print-export-button>`}};p("geoscene-print-map-only-panel",l);export{l as PrintMapOnlyPanel};