/*! 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{B as m,E as p,P as g,S as v,U as h,k as a}from"./3VKC6PRK.js";var c=class extends g{constructor(){super(...arguments),this.geosceneManageVersion=m()}static{this.properties={versionItemElementProps:0}}static{this.shadowRootOptions=p}render(){let{versionItemElementProps:{currentUser:$,currentVersionIdentifier:V,isVersionAdministrator:f,isVersioningApiAvailable:b,serviceUrl:t,strings:{actions:n},versionInfo:e}}=this,s=e.versionIdentifier.name,u=s.substring(s.lastIndexOf(".")+1),r=s.substring(0,s.lastIndexOf(".")),l=e.versionIdentifier.guid,d=`actionSwitchToVersion_${l}`,o=r.toUpperCase()===$.toUpperCase()&&b||f,i=V.guid===e.versionIdentifier.guid,x=a`<calcite-action appearance=transparent .disabled=${i} id=${d??v} icon=code-branch text @click=${()=>{this.geosceneManageVersion.emit({actionType:"changeVersion",serviceUrl:t,versionInfo:e})}} slot=actions-start></calcite-action>`,I=i?void 0:a`<calcite-tooltip overlay-positioning=fixed .referenceElement=${d}><span>${n.switchToVersion}</span></calcite-tooltip>`;return a`<calcite-list-item .description=${r} .label=${u} .value=${l}>${x}${I}<calcite-action-menu overlay-positioning=fixed slot=actions-end label><calcite-action .disabled=${i} icon=code-branch @click=${()=>{this.geosceneManageVersion.emit({actionType:"changeVersion",serviceUrl:t,versionInfo:e})}} scale=s .text=${n.switchToVersion} text-enabled></calcite-action><calcite-action .disabled=${!o||i} icon=code-branch-edit @click=${()=>{this.geosceneManageVersion.emit({actionType:"editVersion",serviceUrl:t,versionInfo:e})}} scale=s .text=${n.editVersion} text-enabled></calcite-action><calcite-action .disabled=${!o||o&&i} icon=trash @click=${()=>{this.geosceneManageVersion.emit({actionType:"deleteVersion",serviceUrl:t,versionInfo:e})}} scale=s .text=${n.deleteVersion} text-enabled></calcite-action></calcite-action-menu></calcite-list-item>`}};h("geoscene-version-management-version-item",c);export{c as GeosceneVersionManagementVersionItem};