Liferay.Loader.define("@liferay/commerce-channel-web@4.0.43/js/CommerceChannelGeneral",["module","exports","require","frontend-js-web"],(function(e,t,n){window;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function({itemSelectorURL:e,namespace:t}){const n=document.getElementById("".concat(t,"fileEntryId")),a=document.getElementById("".concat(t,"fileEntryNameInput")),c=document.getElementById("".concat(t,"fileEntryRemoveIcon")),i=document.getElementById("".concat(t,"selectFileButton"));a&&c&&i&&(i.addEventListener("click",(t=>{t.preventDefault(),(0,l.openSelectionModal)({onSelect:e=>{if(!e)return;const t=JSON.parse(e.value);n&&(n.value=t.fileEntryId),c.classList.remove("hide"),a.innerHTML="<a>"+Liferay.Util.escape(t.title)+"</a>"},selectEventName:"addFileEntry",title:Liferay.Language.get("select-file"),url:e})})),c.addEventListener("click",(e=>{e.preventDefault(),n&&(n.value=0),a.innerText="",c.classList.add("hide")})))};var l=n("frontend-js-web")}));
//# sourceMappingURL=CommerceChannelGeneral.js.map