const e=(e,t)=>{let n=e.upvoters??[],r=e.downvoters??[],i=e.packageDetails instanceof Map?Object.fromEntries(e.packageDetails):e.packageDetails??{};return{id:String(e._id),title:e.title,description:e.description,imageUrl:e.imageUrl,logoUrl:e.logoUrl,websiteUrl:e.websiteUrl,githubUrl:e.githubUrl,tags:e.tags,upvotes:n.length,isUpVoted:t?n.includes(t):!1,isDownVoted:t?r.includes(t):!1,downvotes:r.length,isOpenSource:e.isOpenSource,createdAt:e.createdAt instanceof Date?e.createdAt.toISOString():String(e.createdAt),lastScanDate:e.lastScanDate instanceof Date?e.lastScanDate.toISOString():e.lastScanDate?String(e.lastScanDate):void 0,intlayerVersion:e.intlayerVersion,libsUsed:e.libsUsed,packageDetails:i,scanDetails:e.scanDetails,owner:e.owner,status:e.status,isOwner:t?e.owner===t:!1}},t=(t,n)=>t.map(t=>e(t,n));export{e as mapShowcaseProjectToAPI,t as mapShowcaseProjectsToAPI};
//# sourceMappingURL=showcaseProject.mjs.map