import{memo as e}from"react";import{bool as o,arrayOf as i,shape as t,string as r,func as n,number as s}from"prop-types";import{SortableContainer as l}from"react-sortable-hoc";import{makeStyles as a}from"@material-ui/core";import m from"./SortableComponent.js";import{jsx as p}from"react/jsx-runtime";var d=a({body:{flex:1,minHeight:0,zIndex:0,position:"relative"}}),u=l((function(e){var o=e.isActualBha,i=e.components,t=e.validate,r=e.sortableIndex,n=e.onDeleteComponent,s=e.onSaveComponent,l=e.isMobile,a=e.viewColumnsPerRow,u=e.editColumnsPerRow,c=e.onAutocompleteApplied,R=d();return p("div",{className:R.body,children:i.map((function(e,d){return p(m,{index:d,isSortable:r===d,sortableIndex:r,component:e,isActualBha:o,isTopComponent:0===d,isLastCompnent:d===i.length-1,validate:t,onDelete:n,onSave:s,isMobile:l,viewColumnsPerRow:a,editColumnsPerRow:u,onAutocompleteApplied:c},e.id)}))})}));u.propTypes={isActualBha:o.isRequired,components:i(t({id:r.isRequired})),validate:n.isRequired,sortableIndex:s.isRequired,onSaveComponent:n.isRequired,onDeleteComponent:n.isRequired,isMobile:o.isRequired,viewColumnsPerRow:s.isRequired,editColumnsPerRow:s.isRequired,onAutocompleteApplied:n.isRequired};var c=e(u);export{c as default};
