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