"use strict";(globalThis.webpackChunkPlesk=globalThis.webpackChunkPlesk||[]).push([["app/app/installed"],{3203(e,t,a){a.r(t),a.d(t,{default:()=>l});var s=a(90);const l=({updates:e,instancesList:t,domainIdParam:a,locale:l})=>{l=s.Locale.getSection("smb.components.lists.app.instances"),new s.Panel({renderTo:"installed-apps-list",cls:"list-box",items:[new s.List({id:"instances-list",pageable:!1,data:t,dataUrl:"/app/installed-list-data",columns:[{header:l.lmsg("name"),sortable:!0,dataIndex:"name",cls:"first",renderer(t){let n=t.name?(0,s.escapeHtml)(t.name):l.lmsg("undefinedApp");return t.settingsUrl&&(n=`<a href="${(0,s.prepareUrl)(t.settingsUrl)}">${n}</a>`),[n,e.some(e=>e.resourceId===t.resourceId)?(0,s.createElement)(`.hint-attention.update-available.package-update-${(0,s.escapeHtml)(t.resourceId)}`,(0,s.createElement)("a",{onclick:e=>{e.preventDefault(),(0,s.redirectPost)(`/app-update/index/resourceId/${encodeURIComponent(t.resourceId)+a}`)}},l.lmsg("update"))):null]}},{header:l.lmsg("installedTo"),renderer:e=>e.url?`<a href="${(0,s.escapeAttribute)(e.url)}" target="_blank">${(0,s.escapeHtml)(e.url)}</a>`:e.path?(0,s.escapeHtml)(e.path):l.lmsg("noInstallationUrlAvailable")},{header:"",cls:"last minor t-r",renderer:e=>e.deleteUrl?(0,s.createElement)("a",{onclick:t=>{t.preventDefault();const a=s.Locale.getSection("smb.controllers.service.index");s.messageBox.show({type:s.messageBox.TYPE_YESNO,subtype:s.messageBox.SUBTYPE_DELETE,text:a.lmsg("buttonUninstallApplicationConfirmationTitle"),onYesClick(){(0,s.redirectPost)(e.deleteUrl)}})}},(0,s.escapeHtml)(l.lmsg("uninstall"))):""}],operations:[{componentType:s.SmallButton,title:l.lmsg("buttonScan"),description:l.lmsg("hintButtonScan"),addCls:"sb-refresh",handler(e){const t=Element.cumulativeOffset(e.target),a=(0,s.getComponent)("asyncProgressBarWrapper"),n=a.fly(t,l.lmsg("taskScan"),()=>{s.api.post("/smb/app/scan").then(()=>{a.update()}).catch(({message:e})=>{a.failPreparingItem(n,e)})})}}]})]})}}}]);
//# sourceMappingURL=installed.js.map?3f5e7096a9e5085185aa