var y=Object.defineProperty;var u=Object.getOwnPropertySymbols;var M=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable;var x=(n,s,e)=>s in n?y(n,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[s]=e,b=(n,s)=>{for(var e in s||(s={}))M.call(s,e)&&x(n,e,s[e]);if(u)for(var e of u(s))z.call(s,e)&&x(n,e,s[e]);return n};import{j as t,_ as i,b as k}from"./main.2.8.10.js";import{b as p}from"./react-router.DMwpH23k.js";import{B as W}from"./BackIcn.BFDZx8No.js";import{T as _,t as A}from"./TutorialLink.D6K_DiHL.js";import{y as j}from"./Note.DalStCGz.js";import"./react-vendor.P7K3d6op.js";import"./CopyIcn.BnhKHfEP.js";function R({formID:n,moreConvertWishlistConf:s,setMoreConvertWishlistConf:e,step:o,nextPage:v,isLoading:r,setIsLoading:l,setSnackbar:f}){var m;const[c,N]=p.useState(!1),[h,g]=p.useState(!1),C=()=>{l("auth"),k({},"more_convert_wishlist_authorize").then(a=>{a!=null&&a.success&&(N(!0),f({show:!0,msg:i("Connected with MoreConvert Wishlist Successfully","bit-integrations")})),l(!1),g(!0)})},w=a=>{const d=b({},s);d[a.target.name]=a.target.value,e(d)};return t.jsxs("div",{className:"btcd-stp-page",style:{width:o===1&&900,height:o===1&&"auto"},children:[t.jsx(_,{title:"MoreConvert Wishlist",links:((m=A)==null?void 0:m.moreConvertWishlist)||{}}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:i("Integration Name:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:w,name:"name",value:s.name,type:"text",placeholder:i("Integration Name...","bit-integrations")}),r==="auth"&&t.jsxs("div",{className:"flx mt-5",children:[t.jsx(j,{size:25,clr:"#022217",className:"mr-2"}),i("Checking if MoreConvert Wishlist is authorized!!!","bit-integrations")]}),h&&!c&&!r&&t.jsx("div",{className:"flx mt-5",style:{width:900,justifyContent:"center"},children:t.jsxs("div",{className:"txt-center",children:[t.jsx("div",{className:"btcd-icn btcd-icn-err",children:t.jsx("span",{children:"✕"})}),t.jsx("div",{className:"mt-2",children:i("MoreConvert Wishlist is not activated or not installed","bit-integrations")})]})}),h&&c&&!r&&t.jsxs("div",{className:"flx mt-5",style:{width:900},children:[t.jsx("div",{className:"btcd-icn btcd-icn-success",children:t.jsx("span",{children:"✓"})}),t.jsx("div",{className:"mt-2",children:i("MoreConvert Wishlist is activated","bit-integrations")})]}),t.jsxs("button",{onClick:C,className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:c||r==="auth",children:[c?i("Connected","bit-integrations"):i("Connect to MoreConvert Wishlist","bit-integrations"),r==="auth"&&t.jsx(j,{size:20,clr:"#022217",className:"ml-2"})]}),t.jsx("br",{}),t.jsxs("button",{onClick:()=>v(2),className:"btn f-right btcd-btn-lg purple sh-sm flx",type:"button",disabled:!c,children:[i("Next","bit-integrations"),t.jsx(W,{className:"ml-1 rev-icn"})]})]})}export{R as default};
