"use strict";(self.webpackChunkautonami=self.webpackChunkautonami||[]).push([[371],{20371(e,t,n){n.r(t),n.d(t,{default:()=>p});var r=n(86087),a=n(27723),i=n(75425),l=n(95731),o=n(63142);function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u.apply(null,arguments)}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,l,o=[],u=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(o.push(r.value),o.length!==t);u=!0);}catch(e){c=!0,a=e}finally{try{if(!u&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw a}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var f=(0,r.lazy)(function(){return n.e(1388).then(n.bind(n,51388))}),m=(0,r.lazy)(function(){return Promise.all([n.e(5684),n.e(2919)]).then(n.bind(n,12919))}),g=(0,r.lazy)(function(){return n.e(4217).then(n.bind(n,44217))}),d=(0,r.lazy)(function(){return n.e(1279).then(n.bind(n,11279))});const p=function(e){var t=c((0,r.useState)(!1),2),n=t[0],s=t[1],p=l.A.getStep(),y=l.A.getCampaignId(),b=l.A.getCampaignData(),h=(0,o.A)().setL2Title;(0,r.useEffect)(function(){h("title"in b?(0,r.createElement)(r.Fragment,null,b.title):"")},[b]);var v=function(t){switch(t){case 1:return(0,r.createElement)(f,{campaignId:y,setPending:s,isPending:n});case 2:return(0,r.createElement)(m,u({},e,{setPending:s,isPending:n}));case 3:return(0,r.createElement)(g,{setPending:s,isPending:n});case 4:return(0,r.createElement)(d,{setPending:s,isPending:n});default:return(0,r.createElement)(r.Fragment,null,(0,a.__)("There is some error","wp-marketing-automations"))}},k=[{key:1,label:(0,a.__)("Information","wp-marketing-automations"),content:v(1)},{key:2,label:(0,a.__)("Contacts","wp-marketing-automations"),content:v(2)},{key:3,label:(0,a.__)("Content","wp-marketing-automations"),content:v(3)},{key:4,label:(0,a.__)("Review","wp-marketing-automations"),content:v(4)}];return(0,r.createElement)("div",{"data-step":p},(0,r.createElement)(i.A,{steps:k,currentStep:parseInt(p)>0?p:1,isPending:n}))}}}]);