function _classCallCheck(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function _possibleConstructorReturn(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:n}function _inherits(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}var _createClass=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),ImageSlick=function(n){function t(n){return _classCallCheck(this,t),_possibleConstructorReturn(this,Object.getPrototypeOf(t).call(this,n))}return _inherits(t,n),_createClass(t,[{key:"componentDidMount",value:function(){this.props.models.length>1&&$(this.refs.slickHere).slick({autoplaySpeed:this.props.autoplaySpeed,autoplay:!0,infinite:!0,slidesToShow:1,slidesToScroll:1,prevArrow:$(this.refs.leftBtn),nextArrow:$(this.refs.rightBtn)})}},{key:"componentWillUnmount",value:function(){$(this.refs.slickWrapper).slick("unslick")}},{key:"render",value:function(){return this.props.models&&this.props.models.length>0&&React.createElement("div",{className:"slidepic"},React.createElement("div",{ref:"slickHere"},this._createImage()),this.props.models.length>1&&React.createElement("div",null,React.createElement("div",{className:"arrow-left"},React.createElement("img",{ref:"leftBtn",src:"/Images/arrow-left.png"})),React.createElement("div",{className:"arrow-right"},React.createElement("img",{ref:"rightBtn",src:"/Images/arrow-right.png"}))),React.createElement("div",{className:"originaldrama-logo"},React.createElement("img",{src:"/Images/ebc-creativelogo_01.png"})))}},{key:"_createImage",value:function(){if(this.props.models&&this.props.models.length>0)return this.props.models.map(function(n,t){var i=n.url?n.url:"javascript:;",r=n.openlink.toUpperCase()==="Y"?"_blank":"_top";return React.createElement("div",{key:t,style:{position:"relative"}},React.createElement("a",{href:i,target:r},React.createElement("img",{src:n.image,title:n.title,alt:n.title})),n.is_hot.toUpperCase()==="Y"&&React.createElement("div",{className:"hot"},React.createElement("img",{src:"/Images/hot.jpg"})))})}}]),t}(React.Component);ImageSlick.defaultProps={models:{title:"",url:"",is_hot:"N"},autoplaySpeed:3e3};ImageSlick.propTypes={models:PropTypes.arrayOf(PropTypes.shape({id:PropTypes.number.isRequired,image:PropTypes.string.isRequired,openlink:PropTypes.string.isRequired,title:PropTypes.string,url:PropTypes.string,is_hot:PropTypes.string})),autoplaySpeed:PropTypes.number}