Liferay.Loader.define("item-selector-taglib@5.2.21/item_selector_uploader/js/utils/getPreviewProps",["module","exports","require","frontend-js-web"],(function(e,t,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r("frontend-js-web");function a(e){return{groups:[{data:[{key:Liferay.Language.get("format"),value:e.type},{key:Liferay.Language.get("size"),value:(0,i.formatStorage)(e.size)},{key:Liferay.Language.get("name"),value:e.name}],title:Liferay.Language.get("file-info")}]}}var n=function({closeCaption:e,file:t,itemData:r,itemSelectedEventName:n,uploadItemReturnType:u}){const l=r.file,d=l.url;let f=l.resolvedValue;if(!f){const e={fileEntryId:l.fileEntryId,groupId:l.groupId,title:l.title,type:l.type,url:d,uuid:l.uuid};f=JSON.stringify(e)}return{currentIndex:0,handleSelectedItem:({returntype:e,value:t})=>{(0,i.getOpener)().Liferay.fire(n,{data:{returnType:e,value:t}})},headerTitle:e,itemReturnType:u,items:[{fileEntryId:l.fileEntryId,metadata:JSON.stringify(a(t)),mimeType:l.mimeType,returntype:u,title:l.title,url:d,value:f}]}};t.default=n}}));
//# sourceMappingURL=getPreviewProps.js.map