import React from 'react';
import { View } from 'react-native';
import { withCMSProvider } from './CMSProvider';
import { CMSBanner } from './CMSBanner';
import { MultiCarousel } from './MultiCarousel';
const DEFAULT_CAROUSEL_PROPS = {
    height: 200
};
class CMSBannerCarousel extends CMSBanner {
    render() {
        const { carouselProps } = this.props;
        const { cmsData } = this.props;
        const _carouselProps = carouselProps || DEFAULT_CAROUSEL_PROPS;
        if (!cmsData || !cmsData.instances) {
            return null;
        }
        return (<View style={this.props.style}>
        <MultiCarousel itemsPerPage={1} items={cmsData.instances} renderItem={this.renderInstance} {..._carouselProps}/>
      </View>);
    }
}
const WrappedCMSBannerCarousel = withCMSProvider(CMSBannerCarousel);
export { WrappedCMSBannerCarousel as CMSBannerCarousel };
//# sourceMappingURL=CMSBannerCarousel.js.map