import{__assign as e}from"../../../node_modules/tslib/tslib.es6.js";import t,{useState as r}from"react";import n from"../../../node_modules/reactstrap/es/Carousel.js";import o from"../../../node_modules/reactstrap/es/CarouselControl.js";import a from"../../../node_modules/reactstrap/es/CarouselItem.js";import l from"../../../node_modules/reactstrap/es/CarouselCaption.js";import{DEFAULT_BLOC_PROPERTIES as i}from"../../Bloc/BlocProperties.js";import{isVideo as s}from"../../../utils/string.js";import{Video as m}from"../../Media/Video.js";var c=e(e({},i),{images:[""]});export default function(e){var i=r(0),c=i[0],u=i[1],p=r(!1),d=p[0],f=p[1],x=e.images,g=function(){if(!d){var e=c===x.length-1?0:c+1;u(e)}},v=function(){if(!d){var e=0===c?x.length-1:c-1;u(e)}},E=(x||[]).map((function(e,r){var n=e.url,o=e.heroText,i=(r+x.length-c)%x.length;return t.createElement(a,{className:"left-"+i,tag:"div",key:r,onExiting:function(){return f(!0)},onExited:function(){return f(!1)}},s(n)?t.createElement(m,{url:n,autoPlay:!0}):t.createElement("img",{className:"d-block w-100",src:n||"/static/icons/app-image-upload.svg",alt:"image "+o}),null!=o?t.createElement(l,{className:"caption-text",captionText:"",captionHeader:o}):t.createElement(t.Fragment,null))}));return t.createElement(t.Fragment,null,t.createElement("div",{className:"CarouselElement "},t.createElement(n,{activeIndex:c,next:g,previous:v,interval:3e3},E,t.createElement(o,{direction:"prev",directionText:"Previous",onClickHandler:v}),t.createElement(o,{direction:"next",directionText:"Next",onClickHandler:g}))),t.createElement("style",null,"\n          .carousel-control-next, .carousel-control-prev {\n              max-width: 75px;\n          }\n\n        "))}export{c as DEFAULT_SLIDER};
//# sourceMappingURL=Slider.js.map
