"use strict";
(globalThis["webpackChunkathemes_starter_sites"] = globalThis["webpackChunkathemes_starter_sites"] || []).push([["v2_onboarding_src_components_Steps_Import_js"],{

/***/ "./v2/onboarding/src/assets/images/link.svg":
/*!**************************************************!*\
  !*** ./v2/onboarding/src/assets/images/link.svg ***!
  \**************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   ReactComponent: () => (/* binding */ SvgLink),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
var _path;
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }

var SvgLink = function SvgLink(props) {
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg", _extends({
    xmlns: "http://www.w3.org/2000/svg",
    width: 14,
    height: 14,
    fill: "none"
  }, props), _path || (_path = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", {
    fill: "#fff",
    d: "M8 1c0-.531.438-1 1-1h3.969c.156 0 .281.031.406.094a1 1 0 0 1 .313.219c.187.187.28.437.312.687v4c0 .563-.469 1-1 1-.562 0-1-.437-1-1V3.438l-5.312 5.28a.964.964 0 0 1-1.407 0 .964.964 0 0 1 0-1.405L10.563 2H9c-.562 0-1-.437-1-1M0 3c0-1.094.875-2 2-2h3c.531 0 1 .469 1 1 0 .563-.469 1-1 1H2v9h9V9c0-.531.438-1 1-1 .531 0 1 .469 1 1v3c0 1.125-.906 2-2 2H2c-1.125 0-2-.875-2-2z"
  })));
};

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHZpZXdCb3g9IjAgMCAxNCAxNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxwYXRoIGQ9Ik04IDFDOCAwLjQ2ODc1IDguNDM3NSAwIDkgMEgxMi45Njg4QzEzLjEyNSAwIDEzLjI1IDAuMDMxMjUgMTMuMzc1IDAuMDkzNzVDMTMuNDY4OCAwLjEyNSAxMy41OTM4IDAuMjE4NzUgMTMuNjg3NSAwLjMxMjVDMTMuODc1IDAuNSAxMy45Njg4IDAuNzUgMTQgMVY1QzE0IDUuNTYyNSAxMy41MzEyIDYgMTMgNkMxMi40Mzc1IDYgMTIgNS41NjI1IDEyIDVWMy40Mzc1TDYuNjg3NSA4LjcxODc1QzYuMzEyNSA5LjEyNSA1LjY1NjI1IDkuMTI1IDUuMjgxMjUgOC43MTg3NUM0Ljg3NSA4LjM0Mzc1IDQuODc1IDcuNjg3NSA1LjI4MTI1IDcuMzEyNUwxMC41NjI1IDJIOUM4LjQzNzUgMiA4IDEuNTYyNSA4IDFaTTAgM0MwIDEuOTA2MjUgMC44NzUgMSAyIDFINUM1LjUzMTI1IDEgNiAxLjQ2ODc1IDYgMkM2IDIuNTYyNSA1LjUzMTI1IDMgNSAzSDJWMTJIMTFWOUMxMSA4LjQ2ODc1IDExLjQzNzUgOCAxMiA4QzEyLjUzMTIgOCAxMyA4LjQ2ODc1IDEzIDlWMTJDMTMgMTMuMTI1IDEyLjA5MzggMTQgMTEgMTRIMkMwLjg3NSAxNCAwIDEzLjEyNSAwIDEyVjNaIiBmaWxsPSJ3aGl0ZSIvPg0KPC9zdmc+");

/***/ }),

/***/ "./v2/onboarding/src/assets/images/success-botiga.svg":
/*!************************************************************!*\
  !*** ./v2/onboarding/src/assets/images/success-botiga.svg ***!
  \************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   ReactComponent: () => (/* binding */ SvgSuccessBotiga),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
var _rect, _path;
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }

var SvgSuccessBotiga = function SvgSuccessBotiga(props) {
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg", _extends({
    xmlns: "http://www.w3.org/2000/svg",
    width: 74,
    height: 74,
    fill: "none"
  }, props), _rect || (_rect = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("rect", {
    width: 74,
    height: 74,
    fill: "#E4F5F2",
    rx: 37
  })), _path || (_path = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", {
    fill: "#009683",
    d: "M50.375 27.625c.813.75.813 2.063 0 2.813l-16 16a1.927 1.927 0 0 1-2.812 0l-8-8a1.927 1.927 0 0 1 0-2.813 1.927 1.927 0 0 1 2.812 0L33 42.188l14.563-14.563a1.927 1.927 0 0 1 2.812 0"
  })));
};

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNzQiIGhlaWdodD0iNzQiIHZpZXdCb3g9IjAgMCA3NCA3NCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxyZWN0IHdpZHRoPSI3NCIgaGVpZ2h0PSI3NCIgcng9IjM3IiBmaWxsPSIjRTRGNUYyIi8+DQo8cGF0aCBkPSJNNTAuMzc1IDI3LjYyNUM1MS4xODc1IDI4LjM3NSA1MS4xODc1IDI5LjY4NzUgNTAuMzc1IDMwLjQzNzVMMzQuMzc1IDQ2LjQzNzVDMzMuNjI1IDQ3LjI1IDMyLjMxMjUgNDcuMjUgMzEuNTYyNSA0Ni40Mzc1TDIzLjU2MjUgMzguNDM3NUMyMi43NSAzNy42ODc1IDIyLjc1IDM2LjM3NSAyMy41NjI1IDM1LjYyNUMyNC4zMTI1IDM0LjgxMjUgMjUuNjI1IDM0LjgxMjUgMjYuMzc1IDM1LjYyNUwzMyA0Mi4xODc1TDQ3LjU2MjUgMjcuNjI1QzQ4LjMxMjUgMjYuODEyNSA0OS42MjUgMjYuODEyNSA1MC4zNzUgMjcuNjI1WiIgZmlsbD0iIzAwOTY4MyIvPg0KPC9zdmc+DQo=");

/***/ }),

/***/ "./v2/onboarding/src/assets/images/success.svg":
/*!*****************************************************!*\
  !*** ./v2/onboarding/src/assets/images/success.svg ***!
  \*****************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   ReactComponent: () => (/* binding */ SvgSuccess),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
var _rect, _path;
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }

var SvgSuccess = function SvgSuccess(props) {
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg", _extends({
    xmlns: "http://www.w3.org/2000/svg",
    width: 74,
    height: 74,
    fill: "none"
  }, props), _rect || (_rect = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("rect", {
    width: 74,
    height: 74,
    fill: "#E3FCE7",
    rx: 37
  })), _path || (_path = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", {
    fill: "#008A20",
    d: "M50.375 27.625c.813.75.813 2.063 0 2.813l-16 16a1.927 1.927 0 0 1-2.812 0l-8-8a1.927 1.927 0 0 1 0-2.813 1.927 1.927 0 0 1 2.812 0L33 42.188l14.563-14.563a1.927 1.927 0 0 1 2.812 0"
  })));
};

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNzQiIGhlaWdodD0iNzQiIHZpZXdCb3g9IjAgMCA3NCA3NCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxyZWN0IHdpZHRoPSI3NCIgaGVpZ2h0PSI3NCIgcng9IjM3IiBmaWxsPSIjRTNGQ0U3Ii8+DQo8cGF0aCBkPSJNNTAuMzc1IDI3LjYyNUM1MS4xODc1IDI4LjM3NSA1MS4xODc1IDI5LjY4NzUgNTAuMzc1IDMwLjQzNzVMMzQuMzc1IDQ2LjQzNzVDMzMuNjI1IDQ3LjI1IDMyLjMxMjUgNDcuMjUgMzEuNTYyNSA0Ni40Mzc1TDIzLjU2MjUgMzguNDM3NUMyMi43NSAzNy42ODc1IDIyLjc1IDM2LjM3NSAyMy41NjI1IDM1LjYyNUMyNC4zMTI1IDM0LjgxMjUgMjUuNjI1IDM0LjgxMjUgMjYuMzc1IDM1LjYyNUwzMyA0Mi4xODc1TDQ3LjU2MjUgMjcuNjI1QzQ4LjMxMjUgMjYuODEyNSA0OS42MjUgMjYuODEyNSA1MC4zNzUgMjcuNjI1WiIgZmlsbD0iIzAwOEEyMCIvPg0KPC9zdmc+");

/***/ }),

/***/ "./v2/onboarding/src/components/Layout/Complete.js":
/*!*********************************************************!*\
  !*** ./v2/onboarding/src/components/Layout/Complete.js ***!
  \*********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _assets_images_success_svg__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../assets/images/success.svg */ "./v2/onboarding/src/assets/images/success.svg");
/* harmony import */ var _assets_images_success_botiga_svg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../assets/images/success-botiga.svg */ "./v2/onboarding/src/assets/images/success-botiga.svg");
/* harmony import */ var _assets_images_link_svg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../assets/images/link.svg */ "./v2/onboarding/src/assets/images/link.svg");
/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./index */ "./v2/onboarding/src/components/Layout/index.js");
/* harmony import */ var _utils_config__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils/config */ "./v2/onboarding/src/utils/config.js");
/* harmony import */ var _utils_is_botiga__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../utils/is-botiga */ "./v2/onboarding/src/utils/is-botiga.js");
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__);
/**
 * Complete component.
 * Displays the success screen after import is complete with a preview iframe.
 *
 * @package Athemes Starter Sites
 */










function ArrowIcon() {
  return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("svg", {
    width: "16",
    height: "11",
    viewBox: "0 0 16 11",
    fill: "none",
    xmlns: "http://www.w3.org/2000/svg",
    "aria-hidden": "true",
    focusable: "false",
    children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("path", {
      d: "M10.4062 0.140625C10.582 4.51798e-07 10.8281 4.30284e-07 11.0039 0.140625L15.6445 4.78125C15.7852 4.95703 15.7852 5.20312 15.6445 5.37891L11.0039 10.0195C10.8281 10.1602 10.582 10.1602 10.4062 10.0195L9.70312 9.31641C9.5625 9.14063 9.5625 8.89453 9.73828 8.71875L12.5508 6.01172L0.421874 6.01172C0.210937 6.01172 -1.00946e-06 5.80078 -1.0279e-06 5.58985L-1.11396e-06 4.60547C-1.13547e-06 4.35938 0.210936 4.1836 0.421874 4.1836L12.5508 4.18359L9.73828 1.44141C9.5625 1.26563 9.5625 1.01953 9.70312 0.843751L10.4062 0.140625Z",
      fill: "currentColor"
    })
  });
}
function ExternalIcon() {
  return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("svg", {
    width: "16",
    height: "16",
    viewBox: "0 0 16 16",
    fill: "none",
    xmlns: "http://www.w3.org/2000/svg",
    "aria-hidden": "true",
    focusable: "false",
    children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("path", {
      d: "M10 0H15C15.5312 0 16 0.46875 16 1V6C16 6.5625 15.5312 7 15 7C14.4375 7 14 6.5625 14 6V3.4375L7.6875 9.71875C7.3125 10.125 6.65625 10.125 6.28125 9.71875C5.875 9.34375 5.875 8.6875 6.28125 8.3125L12.5625 2H10C9.4375 2 9 1.5625 9 1C9 0.46875 9.4375 0 10 0ZM2.5 1H6C6.53125 1 7 1.46875 7 2C7 2.5625 6.53125 3 6 3H2.5C2.21875 3 2 3.25 2 3.5V13.5C2 13.7812 2.21875 14 2.5 14H12.5C12.75 14 13 13.7812 13 13.5V10C13 9.46875 13.4375 9 14 9C14.5312 9 15 9.46875 15 10V13.5C15 14.9062 13.875 16 12.5 16H2.5C1.09375 16 0 14.9062 0 13.5V3.5C0 2.125 1.09375 1 2.5 1Z",
      fill: "currentColor"
    })
  });
}
function Complete() {
  const siteUrl = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useRef)(window.atssOnboarding?.homeUrl || window.location.origin);
  const customizeUrl = window.atssOnboarding?.customizeUrl;
  const wcSetupUrl = `${siteUrl.current.replace(/\/$/, '')}/wp-admin/admin.php?page=wc-admin&path=/setup-wizard`;
  const dashboardUrl = window.atssOnboarding?.dashboardUrl;
  const isWooOnboardingCompleted = !!window.atssOnboarding?.isWooOnboardingCompleted;
  const [isIframeLoading, setIsIframeLoading] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(true);
  const [isIframeError, setIsIframeError] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
  const [isHovering, setIsHovering] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
  const handleViewSite = () => {
    window.open(siteUrl.current, '_blank');
  };
  const handleDocumentation = () => {
    window.open(_utils_config__WEBPACK_IMPORTED_MODULE_6__.DOCUMENTATION_URL, '_blank');
  };
  const handleIframeLoad = () => {
    setIsIframeLoading(false);
  };
  const handleIframeError = () => {
    setIsIframeLoading(false);
    setIsIframeError(true);
  };
  const handlePreviewClick = () => {
    window.open(siteUrl.current, '_blank');
  };
  const footerActions = [{
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Customize Site', 'athemes-starter-sites'),
    onClick: () => {
      if (customizeUrl) {
        window.open(customizeUrl, '_blank');
      }
    }
  }, {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Documentation', 'athemes-starter-sites'),
    onClick: handleDocumentation
  }, {
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Join Facebook Group', 'athemes-starter-sites'),
    onClick: () => {
      window.open(_utils_config__WEBPACK_IMPORTED_MODULE_6__.FACEBOOK_GROUP_URL, '_blank');
    }
  }];
  const botigaActions = [{
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('View Your Site', 'athemes-starter-sites'),
    description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Open your site to check out the live front-end view.', 'athemes-starter-sites'),
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('View Site', 'athemes-starter-sites'),
    href: siteUrl.current,
    isPrimary: true
  }, {
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Edit Your Site', 'athemes-starter-sites'),
    description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Go to the Site Editor to edit your homepage, navigation, and customize your site’s design.', 'athemes-starter-sites'),
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Edit Site', 'athemes-starter-sites'),
    href: customizeUrl,
    isPrimary: true
  }, !isWooOnboardingCompleted && {
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('WooCommerce Setup', 'athemes-starter-sites'),
    description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Finish setting up WooCommerce to start selling products and accepting payments.', 'athemes-starter-sites'),
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('WooCommerce Setup', 'athemes-starter-sites'),
    href: wcSetupUrl
  }, {
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Keep Tabs on What’s Important', 'athemes-starter-sites'),
    description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Visit the dashboard for quick access to everything that matters and gain important insights.', 'athemes-starter-sites'),
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Visit Dashboard', 'athemes-starter-sites'),
    href: dashboardUrl
  }, {
    title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('View Botiga Docs', 'athemes-starter-sites'),
    description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Watch tutorial videos and read through the docs to learn how to get the most from Botiga.', 'athemes-starter-sites'),
    label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('View Docs', 'athemes-starter-sites'),
    href: _utils_config__WEBPACK_IMPORTED_MODULE_6__.DOCUMENTATION_URL,
    isExternal: true
  }].filter(Boolean);
  const themeText = {
    wizardTitle: _utils_is_botiga__WEBPACK_IMPORTED_MODULE_7__["default"] ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Shop Setup Complete! 🎉', 'athemes-starter-sites') : (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Site setup complete!', 'athemes-starter-sites'),
    wizardDescription: _utils_is_botiga__WEBPACK_IMPORTED_MODULE_7__["default"] ? isWooOnboardingCompleted ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Now you can view, edit, and customize your site using the Site Editor. Refer to our docs if you need more direction.', 'athemes-starter-sites') : (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Now you can view, edit, and customize your site using the Site Editor. Don’t forget to finish setting up WooCommerce, and refer to our docs if you need more direction.', 'athemes-starter-sites') : (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('You can choose to visit site and start customizing it or check out our documentation for more details', 'athemes-starter-sites')
  };
  return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)("div", {
    className: "atss-onboarding-wizard__step atss-onboarding-wizard__step--complete",
    children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("main", {
      className: "atss-onboarding-wizard__step-body",
      children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("div", {
        className: "atss-onboarding-wizard__step-body-content atss-onboarding-wizard__step-body-content-inner",
        children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)("div", {
          className: "atss-complete",
          children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("div", {
            className: "atss-complete__icon-wrapper",
            children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("img", {
              src: _utils_is_botiga__WEBPACK_IMPORTED_MODULE_7__["default"] ? _assets_images_success_botiga_svg__WEBPACK_IMPORTED_MODULE_3__["default"] : _assets_images_success_svg__WEBPACK_IMPORTED_MODULE_2__["default"],
              alt: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Success icon indicating site setup is complete', 'athemes-starter-sites'),
              className: "atss-complete__icon"
            })
          }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)("div", {
            className: "atss-complete__header",
            children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("h2", {
              className: "atss-onboarding-wizard__step-body-title text-xl font-medium",
              children: themeText.wizardTitle
            }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("p", {
              className: "atss-onboarding-wizard__step-body-description text-sm text-secondary",
              children: themeText.wizardDescription
            })]
          }), !_utils_is_botiga__WEBPACK_IMPORTED_MODULE_7__["default"] && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.Fragment, {
            children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("div", {
              className: "atss-complete__preview",
              children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)("div", {
                className: "atss-complete__preview-inner",
                onMouseEnter: () => setIsHovering(true),
                onMouseLeave: () => setIsHovering(false),
                onClick: handlePreviewClick,
                children: [isIframeLoading && !isIframeError ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("div", {
                  className: "atss-complete__preview-loading",
                  children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_index__WEBPACK_IMPORTED_MODULE_5__.Spinner, {})
                }) : null, isHovering && !isIframeLoading ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("div", {
                  className: "atss-complete__preview-overlay",
                  children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("div", {
                    className: "atss-complete__preview-overlay-icon",
                    children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("img", {
                      src: _assets_images_link_svg__WEBPACK_IMPORTED_MODULE_4__["default"],
                      alt: ""
                    })
                  })
                }) : null, isIframeError ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)("div", {
                  className: "atss-complete__preview-error",
                  children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("p", {
                    children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Unable to load site preview', 'athemes-starter-sites')
                  }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("button", {
                    type: "button",
                    className: "atss-onboarding-wizard__btn atss-onboarding-wizard__btn--continue",
                    onClick: handleViewSite,
                    children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('View Site Anyway', 'athemes-starter-sites')
                  })]
                }) : /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("iframe", {
                  src: siteUrl.current,
                  title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Site Preview', 'athemes-starter-sites'),
                  className: "atss-complete__iframe",
                  onLoad: handleIframeLoad,
                  onError: handleIframeError
                })]
              })
            }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)("button", {
              type: "button",
              className: "atss-onboarding-wizard__btn atss-onboarding-wizard__btn--continue w100",
              onClick: handleViewSite,
              children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("span", {
                children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Visit Site', 'athemes-starter-sites')
              }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("span", {
                className: "atss-onboarding-wizard__btn-arrow",
                "aria-hidden": "true",
                children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(ArrowIcon, {})
              })]
            })]
          }), _utils_is_botiga__WEBPACK_IMPORTED_MODULE_7__["default"] && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("div", {
            className: "atss-complete__actions",
            children: botigaActions.map(action => {
              if (!action.href) {
                return null;
              }
              return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)("div", {
                className: "atss-complete__action-item",
                children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)("div", {
                  className: "atss-complete__action-content",
                  children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("h4", {
                    children: action.title
                  }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("p", {
                    children: action.description
                  })]
                }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)("a", {
                  href: action.href,
                  className: `atss-complete__action-link${action.isPrimary ? '' : ' atss-complete__action-link--outline'}`,
                  target: "_blank",
                  rel: action.isExternal ? 'noreferrer' : undefined,
                  children: [action.label, action.isExternal ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(ExternalIcon, {}) : action.isPrimary ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(ArrowIcon, {}) : null]
                })]
              }, action.title);
            })
          })]
        })
      })
    }), !_utils_is_botiga__WEBPACK_IMPORTED_MODULE_7__["default"] && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("footer", {
      className: "atss-onboarding-wizard__footer flex gap-md",
      children: footerActions.map((action, index) => /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_index__WEBPACK_IMPORTED_MODULE_5__.FooterButton, {
        label: action.label,
        onClick: action.onClick
      }, index))
    })]
  });
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Complete);

/***/ }),

/***/ "./v2/onboarding/src/components/Steps/Import.js":
/*!******************************************************!*\
  !*** ./v2/onboarding/src/components/Steps/Import.js ***!
  \******************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _Layout__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Layout */ "./v2/onboarding/src/components/Layout/index.js");
/* harmony import */ var _context_WizardContext__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../context/WizardContext */ "./v2/onboarding/src/context/WizardContext.js");
/* harmony import */ var _utils_api__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/api */ "./v2/onboarding/src/utils/api.js");
/* harmony import */ var _Layout_Complete__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Layout/Complete */ "./v2/onboarding/src/components/Layout/Complete.js");
/* harmony import */ var _utils_is_botiga__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils/is-botiga */ "./v2/onboarding/src/utils/is-botiga.js");
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime");
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__);
/**
 * Import step component.
 *
 * Orchestrates the entire import process including:
 * - Plugin installation
 * - Content import with page filtering
 * - Widget import
 * - Customizer import
 * - Wizard customizations application
 *
 * @package Athemes Starter Sites
 */









/**
 * Send email opt-in subscriber to Lindris through aThemes proxy.
 *
 * @param {Object} wizardData The wizard state data.
 * @return {Promise<void>}
 */

const sendEmailToLindris = async wizardData => {
  const optinData = wizardData.optin || {};
  const email = optinData.email;
  if (!email) {
    return;
  }
  const theme = window.atssOnboarding?.themeName || 'Unknown';
  try {
    await fetch('https://athemes.com/wp-json/wpf-api/v1/starter-sites/subscribe', {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({
        email,
        theme
      })
    });
  } catch (error) {
    // eslint-disable-next-line no-console
    console.warn('Lindris opt-in failed:', error);
  }
};

/**
 * Plugin paths for the no-starter flow.
 * Used when installing fallback plugins without a demo config.
 */
const FALLBACK_PLUGIN_PATHS = {
  woocommerce: {
    path: 'woocommerce/woocommerce.php',
    name: 'WooCommerce'
  },
  'wpforms-lite': {
    path: 'wpforms-lite/wpforms.php',
    name: 'WPForms Lite'
  },
  'wp-mail-smtp': {
    path: 'wp-mail-smtp/wp_mail_smtp.php',
    name: 'WP Mail SMTP'
  },
  'all-in-one-seo-pack': {
    path: 'all-in-one-seo-pack/all_in_one_seo_pack.php',
    name: 'All in One SEO'
  },
  'sugar-calendar-lite': {
    path: 'sugar-calendar-lite/sugar-calendar-lite.php',
    name: 'Sugar Calendar Lite'
  },
  merchant: {
    path: 'merchant/merchant.php',
    name: 'Merchant'
  }
};
const NON_INSTALLABLE_PLUGIN_SLUGS = ['gutenberg'];

/**
 * Build the import steps array based on wizard data.
 *
 * @param {Object} wizardData The wizard state data.
 * @param {string} builder    The selected builder.
 * @return {Array} Array of import step objects.
 */
const getImportSteps = (wizardData, builder) => {
  const steps = [];
  const demos = window.atssOnboarding && window.atssOnboarding.demos ? window.atssOnboarding.demos : {};
  const demoId = wizardData.design && wizardData.design.selectedSiteId ? wizardData.design.selectedSiteId : '';
  const customize = wizardData.customize || {};
  const cleanInstall = customize.cleanInstall || false;
  const features = wizardData.features || {};
  const selectedPlugins = features.selectedPlugins || [];

  // 1. Start import (only when importing a starter — PHP validates demo_id).
  if (demoId) {
    steps.push({
      action: 'atss_import_start',
      log: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Starting import...', 'athemes-starter-sites'),
      priority: 1
    });
  }

  // 2. Clean previous import (conditional — only when a starter is being imported).
  if (cleanInstall && demoId) {
    steps.push({
      action: 'atss_import_clean',
      log: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Cleaning previous import...', 'athemes-starter-sites'),
      priority: 2
    });
  }

  // 3. Install plugins.
  if (demoId) {
    // Demo-based plugin install.
    const demo = demos[demoId];
    if (demo && demo.plugins && selectedPlugins.length > 0) {
      const fallbackPlugins = {
        'elementor': {
          slug: 'elementor',
          path: 'elementor/elementor.php',
          name: 'Elementor'
        },
        'all-in-one-seo-pack': {
          slug: 'all-in-one-seo-pack',
          path: 'all-in-one-seo-pack/all_in_one_seo_pack.php',
          name: 'All in One SEO'
        },
        'athemes-blocks': {
          slug: 'athemes-blocks',
          path: 'athemes-blocks/athemes-blocks.php',
          name: 'aThemes Blocks'
        },
        'athemes-addons-for-elementor-lite': {
          slug: 'athemes-addons-for-elementor-lite',
          path: 'athemes-addons-for-elementor-lite/athemes-addons-elementor.php',
          name: 'aThemes Addons'
        }
      };
      selectedPlugins.forEach(slug => {
        let plugin = demo.plugins.find(p => p.slug === slug);
        if (!plugin && fallbackPlugins[slug]) {
          plugin = fallbackPlugins[slug];
        }
        if (plugin) {
          steps.push({
            action: 'atss_import_plugin',
            slug: plugin.slug,
            path: plugin.path,
            log: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Installing', 'athemes-starter-sites') + ' ' + plugin.name + '...',
            priority: 3
          });
        }
      });
    }
  } else if (selectedPlugins.length > 0) {
    // No-starter flow: install from fallback paths.
    selectedPlugins.forEach(slug => {
      if (NON_INSTALLABLE_PLUGIN_SLUGS.includes(slug)) {
        return;
      }
      const info = FALLBACK_PLUGIN_PATHS[slug];
      if (info) {
        steps.push({
          action: 'atss_import_plugin',
          slug: slug,
          path: info.path,
          log: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Installing', 'athemes-starter-sites') + ' ' + info.name + '...',
          priority: 3
        });
      }
    });
  }

  // 4-6. Content, widgets, customizer — only when importing a starter.
  if (demoId) {
    steps.push({
      action: 'atss_import_contents',
      log: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Importing content...', 'athemes-starter-sites'),
      priority: 4
    });
    steps.push({
      action: 'atss_import_widgets',
      log: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Importing widgets...', 'athemes-starter-sites'),
      priority: 5
    });
    steps.push({
      action: 'atss_import_customizer',
      log: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Importing customizer settings...', 'athemes-starter-sites'),
      priority: 6
    });
  }

  // 7. Apply wizard customizations (logo, colors, typography, site title).
  steps.push({
    action: 'atss_apply_wizard_customizations',
    log: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Applying your customizations...', 'athemes-starter-sites'),
    priority: 7
  });

  // 8. Finish import (only when importing a starter — PHP validates demo_id).
  if (demoId) {
    steps.push({
      action: 'atss_import_finish',
      log: _utils_is_botiga__WEBPACK_IMPORTED_MODULE_6__["default"] ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Compiling Composer Elements', 'athemes-starter-sites') : (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Finishing import...', 'athemes-starter-sites'),
      priority: 8
    });
  }
  return steps;
};

/**
 * Import step component.
 *
 * @param {Object}   props            Component props.
 * @param {Function} props.onContinue Callback when import is complete.
 * @param {Function} props.onImportingChange Callback when import is started or stopped.
 * @return {JSX.Element} Import component.
 */
function Import({
  onContinue,
  onImportingChange
}) {
  const {
    wizardData,
    setIsImportComplete,
    builder
  } = (0,_context_WizardContext__WEBPACK_IMPORTED_MODULE_3__.useWizard)();
  const [progress, setProgress] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(0);
  const [status, setStatus] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Preparing import...', 'athemes-starter-sites'));
  const [isComplete, setIsComplete] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
  const [error, setError] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(null);
  const [importStarted, setImportStarted] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false);

  // Get import configuration from wizard data.
  const design = wizardData.design || {};
  const demoId = design.selectedSiteId || '';
  const selectedBuilder = builder || 'gutenberg';

  /**
   * Execute the import steps sequentially.
   */
  const executeImport = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useCallback)(async () => {
    onImportingChange?.(true);

    // Send email to Lindris first (non-blocking).
    sendEmailToLindris(wizardData);
    const steps = getImportSteps(wizardData, selectedBuilder);
    if (steps.length === 0) {
      setError((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('No import steps configured.', 'athemes-starter-sites'));
      onImportingChange?.(false);
      return;
    }
    let currentStep = 0;
    while (currentStep < steps.length) {
      const step = steps[currentStep];

      // Update UI.
      setStatus(step.log);
      setProgress(Math.round(currentStep / steps.length * 100));
      try {
        // Execute the AJAX request.
        const response = await (0,_utils_api__WEBPACK_IMPORTED_MODULE_4__.importAjaxRequest)({
          ...step,
          demo_id: demoId,
          builder_type: selectedBuilder
        });

        // Check for errors.
        if (response && response.success === false) {
          // For widget and customizer imports, log but don't block.
          if (step.action === 'atss_import_widgets' || step.action === 'atss_import_customizer') {
            // eslint-disable-next-line no-console
            console.warn('Non-critical import step failed:', step.action, response.data);
            currentStep++;
            continue;
          }

          // For plugin installs, log but continue.
          if (step.action === 'atss_import_plugin') {
            // eslint-disable-next-line no-console
            console.warn('Plugin installation failed:', step.slug, response.data);
            currentStep++;
            continue;
          }

          // For other steps, show error.
          throw new Error(response.data || (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Import step failed.', 'athemes-starter-sites'));
        }

        // Handle newAJAX response (content import needs multiple calls).
        if (response && response.status === 'newAJAX') {
          // Don't increment step, retry the same step.
          continue;
        }

        // Move to next step.
        currentStep++;
      } catch (err) {
        // eslint-disable-next-line no-console
        console.error('Import error:', err);

        // For content timeout, retry once.
        if (step.action === 'atss_import_contents' && err.name === 'AbortError') {
          // eslint-disable-next-line no-console
          console.log('Content import timeout, retrying...');
          continue;
        }

        // For widget timeouts, skip and continue.
        if (step.action === 'atss_import_widgets' && err.name === 'AbortError') {
          // eslint-disable-next-line no-console
          console.warn('Widget import timed out, skipping...');
          currentStep++;
          continue;
        }
        setError(err.message || (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('An error occurred during import.', 'athemes-starter-sites'));
        onImportingChange?.(false);
        return;
      }
    }

    // No-starter flow: clear wizard state (atss_import_finish handles this for starter flow).
    if (!demoId) {
      await (0,_utils_api__WEBPACK_IMPORTED_MODULE_4__.deleteWizardState)();
    }

    // Import complete.
    setProgress(100);
    setStatus((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Import complete!', 'athemes-starter-sites'));
    onImportingChange?.(false);
    setIsComplete(true);
    setIsImportComplete(true);
  }, [wizardData, demoId, selectedBuilder, setIsImportComplete, onImportingChange]);

  // Start import on component mount.
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
    if (!importStarted) {
      setImportStarted(true);
      executeImport();
    }
  }, [importStarted, executeImport]);

  // Error state.
  if (error) {
    return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("div", {
      className: "atss-onboarding-wizard__step atss-onboarding-wizard__step--import",
      children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("main", {
        className: "atss-onboarding-wizard__step-body",
        children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("div", {
          className: "atss-onboarding-wizard__step-body-content",
          children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)("div", {
            className: "atss-import-error",
            children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)("svg", {
              width: "64",
              height: "64",
              viewBox: "0 0 24 24",
              fill: "none",
              xmlns: "http://www.w3.org/2000/svg",
              children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("circle", {
                cx: "12",
                cy: "12",
                r: "10",
                stroke: "#dc2626",
                strokeWidth: "2"
              }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("path", {
                d: "M12 7v6",
                stroke: "#dc2626",
                strokeWidth: "2",
                strokeLinecap: "round"
              }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("circle", {
                cx: "12",
                cy: "16",
                r: "1",
                fill: "#dc2626"
              })]
            }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("h2", {
              className: "atss-onboarding-wizard__step-body-title text-xl font-medium",
              children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Import Failed', 'athemes-starter-sites')
            }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("p", {
              className: "atss-onboarding-wizard__step-body-description text-sm text-secondary",
              children: error
            }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("button", {
              type: "button",
              className: "atss-button atss-button--primary",
              onClick: () => {
                onImportingChange?.(false);
                setError(null);
                setImportStarted(false);
                setProgress(0);
              },
              children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Try Again', 'athemes-starter-sites')
            })]
          })
        })
      })
    });
  }

  // Completion state.
  if (isComplete) {
    return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_Layout_Complete__WEBPACK_IMPORTED_MODULE_5__["default"], {});
  }
  const themeText = {
    wizardTitle: _utils_is_botiga__WEBPACK_IMPORTED_MODULE_6__["default"] ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('We’re Building Your Shop...', 'athemes-starter-sites') : (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('We Are Building Your Website...', 'athemes-starter-sites')
  };

  // Progress state (default).
  return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("div", {
    className: "atss-onboarding-wizard__step atss-onboarding-wizard__step--import",
    children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("main", {
      className: "atss-onboarding-wizard__step-body",
      children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)("div", {
        className: "atss-onboarding-wizard__step-body-content",
        children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("div", {
          className: "atss-onboarding-wizard__spinner-circle",
          children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_Layout__WEBPACK_IMPORTED_MODULE_2__.Spinner, {})
        }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("h2", {
          className: "atss-onboarding-wizard__step-body-title text-xl font-medium",
          children: themeText.wizardTitle
        }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("p", {
          className: "atss-onboarding-wizard__step-body-description text-sm text-secondary w100",
          children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Please be patient and don’t refresh this page, the import process may take a while.', 'athemes-starter-sites')
        }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)("div", {
          className: "atss-import-progress",
          children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)("div", {
            className: "atss-import-progress__header flex justify-between items-center gap-xs",
            children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("div", {
              className: "atss-import-progress__status text-md font-medium text-primary",
              children: status
            }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)("div", {
              className: "atss-import-progress__percentage text-sm text-secondary",
              children: [progress, "%"]
            })]
          }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("div", {
            className: "atss-import-progress__bar",
            children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("div", {
              className: "atss-import-progress__fill",
              style: {
                '--progress-width': `${progress}%`
              }
            })
          })]
        })]
      })
    })
  });
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Import);

/***/ }),

/***/ "./v2/onboarding/src/utils/config.js":
/*!*******************************************!*\
  !*** ./v2/onboarding/src/utils/config.js ***!
  \*******************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   ACCOUNT_URL: () => (/* binding */ ACCOUNT_URL),
/* harmony export */   ATHEMES_BASE_URL: () => (/* binding */ ATHEMES_BASE_URL),
/* harmony export */   DEFAULT_UPGRADE_URL: () => (/* binding */ DEFAULT_UPGRADE_URL),
/* harmony export */   DOCUMENTATION_URL: () => (/* binding */ DOCUMENTATION_URL),
/* harmony export */   FACEBOOK_GROUP_URL: () => (/* binding */ FACEBOOK_GROUP_URL)
/* harmony export */ });
/**
 * Configuration constants for the onboarding wizard.
 *
 * @package Athemes Starter Sites
 */

/**
 * Base URL for Athemes website.
 *
 * @type {string}
 */
const ATHEMES_BASE_URL = 'https://athemes.com';

/**
 * Account dashboard URL.
 * This is the same for all products.
 *
 * @type {string}
 */
const ACCOUNT_URL = `${ATHEMES_BASE_URL}/account/`;

/**
 * Default upgrade URL.
 *
 * @type {string}
 */
const DEFAULT_UPGRADE_URL = `${ATHEMES_BASE_URL}/`;

/**
 * Documentation URL.
 * The theme name is passed as a parameter to the documentation URL.
 *
 * @type {string}
 */
const DOCUMENTATION_URL = `https://docs.athemes.com/documentation/${window.atssOnboarding?.themeName}`;

/**
 * Facebook Group URL.
 *
 * @type {string}
 */
const FACEBOOK_GROUP_URL = 'https://www.facebook.com/groups/athemes/';

/***/ })

}]);
//# sourceMappingURL=v2_onboarding_src_components_Steps_Import_js.js.map?ver=acde74106e6cb194a1f3