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