import e from"prop-types";import i from"image-extensions";import{getFileExtension as a}from"../utils/fileExtension.js";import{jsx as s}from"react/jsx-runtime";var d={image:i,doc:["doc","docx"],xls:["xls","xlsx"],pdf:["pdf"],archive:["zip","rar","7z","tar"]},c={fileTypeWrapper:{display:"inline-block",verticalAlign:"top"}},t=function(e){var i,t=e.fileName,r=e.size,l=e.className,f=a(t);return i=d.image.includes(f)?"/static/media/ce0806d7fe0a5fdedde889e58929cd3a.svg":d.doc.includes(f)?"/static/media/ffd922ae8116b456a7f24dcf118f36b4.svg":d.xls.includes(f)?"/static/media/b88b9008a93dabe2d431b22e76e3017a.svg":d.pdf.includes(f)?"/static/media/af268ec48d747e3147d5acb95bc1b599.svg":d.archive.includes(f)?"/static/media/e26a8e73ce2b62ee8bd6b8eddf286b49.svg":"/static/media/0ea849622ec24faa453981edfd1862e6.svg",s("div",{style:c.fileTypeWrapper,className:l,children:s("img",{src:i,alt:"File icon",style:{display:"block",height:r,width:r}})})};t.propTypes={fileName:e.string.isRequired,size:e.number,className:e.string},t.defaultProps={size:50,className:void 0};export{t as default};
