"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

require("core-js/modules/web.dom-collections.iterator.js");

var _react = _interopRequireWildcard(require("react"));

var _propTypes = _interopRequireDefault(require("prop-types"));

var _d = _interopRequireDefault(require("../../asset/d1.png"));

var _d2 = _interopRequireDefault(require("../../asset/d2.png"));

var _d3 = _interopRequireDefault(require("../../asset/d3.png"));

var _reactSlick = _interopRequireDefault(require("react-slick"));

require("slick-carousel/slick/slick.css");

require("slick-carousel/slick/slick-theme.css");

require("./featuredescriptioncarousel.css");

var _antd = require("antd");

require("antd/dist/antd.css");

var _reactFontawesome = require("@fortawesome/react-fontawesome");

var _freeRegularSvgIcons = require("@fortawesome/free-regular-svg-icons");

var _SignupForm = _interopRequireDefault(require("../SignupForm/SignupForm"));

var _Socialmediasignup = _interopRequireDefault(require("../Socialmediasignup/Socialmediasignup"));

var _reactResponsive = require("react-responsive");

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }

function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }

const Featuredescriptioncarousel = props => {
  const [display, setDisplay] = (0, _react.useState)(false);
  const isDesktopOrLaptop = (0, _reactResponsive.useMediaQuery)({
    query: "(min-width: 980px)"
  });
  let hideCarousel = display && !isDesktopOrLaptop ? "none" : "block";
  /*function for creating custom pagination*/

  const settings = {
    customPaging: function customPaging(i) {
      return /*#__PURE__*/_react.default.createElement("div", {
        style: {
          color: carouselBg
        }
      }, "");
    },
    autoplay: true,
    arrows: false,
    dots: true,
    dotsClass: "slick-dots slick-thumb",
    infinite: true,
    speed: 2,
    slidesToShow: 1,
    slidesToScroll: 1,
    autoplaySpeed: 2000,
    adaptiveHeight: false
  };
  const {
    carouselBg,
    headingColor,
    headingLabel,
    headingTextSize,
    paraTextSize,
    paraColor,
    paraLabel
  } = props;
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
    className: "carousel-center-container",
    style: {
      background: carouselBg,
      display: hideCarousel
    }
  }, /*#__PURE__*/_react.default.createElement("div", {
    className: "carousel-content"
  }, /*#__PURE__*/_react.default.createElement("h3", {
    className: headingTextSize,
    style: {
      color: headingColor
    }
  }, headingLabel), /*#__PURE__*/_react.default.createElement("p", {
    className: paraTextSize,
    style: {
      color: paraColor
    }
  }, paraLabel)), /*#__PURE__*/_react.default.createElement(_reactSlick.default, settings, /*#__PURE__*/_react.default.createElement("img", {
    src: _d.default,
    alt: "description"
  }), /*#__PURE__*/_react.default.createElement("img", {
    src: _d2.default,
    alt: "description"
  }), /*#__PURE__*/_react.default.createElement("img", {
    src: _d3.default,
    alt: "description"
  })), /*#__PURE__*/_react.default.createElement("div", {
    className: "carousel-btn"
  }, /*#__PURE__*/_react.default.createElement(_antd.Button, {
    onClick: () => setDisplay(true)
  }, "Get Started", /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement(_reactFontawesome.FontAwesomeIcon, {
    icon: _freeRegularSvgIcons.faArrowAltCircleRight
  }))))), display && !isDesktopOrLaptop && /*#__PURE__*/_react.default.createElement(_antd.Row, null, /*#__PURE__*/_react.default.createElement(_antd.Col, {
    span: 24
  }, /*#__PURE__*/_react.default.createElement(_SignupForm.default, props))));
};

Featuredescriptioncarousel.propTypes = {
  carouselBg: _propTypes.default.string,
  headingColor: _propTypes.default.string,
  paraColor: _propTypes.default.string,
  headingTextSize: _propTypes.default.string,
  paraTextSize: _propTypes.default.string
};
Featuredescriptioncarousel.defaultProps = {
  carouselBg: "rgba(89, 126, 247, 1)",
  headingColor: "white",
  paraColor: "white",
  headingLabel: "HC Inbox",
  paraLabel: "Description about HC Inbox Feature",
  headingTextSize: "medium",
  paraTextSize: "medium"
};
var _default = Featuredescriptioncarousel;
exports.default = _default;