import e,{useState as r}from"react";import{BsX as t,BsCheck as l}from"../../../node_modules/react-icons/bs/index.esm.js";import{LibraryImagePreview as a}from"../LibraryImagePreview/LibraryImagePreview.js";import"../../Announcement/Announcement.js";import"../../../node_modules/react-modal-promise/lib/index.es.js";import"../../../node_modules/react-hook-form/dist/index.esm.js";import"../../Editor/Modal/libraryModal.css.js";import"../../Editor/TextEditorQuill.js";import"../../Media/Image.js";import"../../Typography/Paragraph/Paragraph-utils.js";import"../../Typography/Paragraph/Paragraph.js";import"../../../node_modules/next/dist/client/router.js";import"../../../node_modules/react-redux/es/index.js";import"../../../node_modules/lodash/lodash.js";import"../../Typography/Paragraph/ParagraphTypes.js";import"../../Typography/Heading.js";import"../../Bloc/BlocTypes.js";import"../../Bloc/BlocComponentsFactory.js";import"../../../BaseComponent.js";import"../../Panel/CtaPanel.js";import"./style.css.js";var i=function(i){var o=i.lastBookElementRef,n=i.file,s=i.onDeleteFile,m=i.setSelectedFile,c=i.selectedFileUrl,p=i.onSelectedFileChange,d=i.isSelectable,u=i.multiSelect,j=r(!1),g=j[0],f=j[1];return e.createElement(e.Fragment,null,e.createElement("div",{ref:o,key:n.url,className:"col-2 file-item-child",onClick:function(){u?(f(!g),p(d,n.url)):(p(d,n.url),m(n))}},e.createElement("div",{className:"file-actions-wrapper"},e.createElement("div",{className:"file-item__btn-wrapper file-actions"},e.createElement("div",{className:"btn btn-link",onClick:function(){return s(n.id)}},e.createElement(t,{color:"#1a202c",size:18}))),e.createElement("div",null,e.createElement("div",{className:"file-item-wrapper FileLibrary__item "+(g?" selected":" "),onClick:function(){return m(n)}},e.createElement(a,{src:n.url,width:"100"}),e.createElement("div",{className:c===n.url?"selected-image-cover":"d-none"},e.createElement("span",null,e.createElement(l,null))))),e.createElement("small",{className:"File__flag"},n.name))))};export{i as GalleryImageDisplay};
//# sourceMappingURL=GalleryImageDisplay.js.map
