var _=Object.defineProperty;var u=Object.getOwnPropertySymbols;var f=Object.prototype.hasOwnProperty,T=Object.prototype.propertyIsEnumerable;var j=(a,i,n)=>i in a?_(a,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):a[i]=n,c=(a,i)=>{for(var n in i||(i={}))f.call(i,n)&&j(a,n,i[n]);if(u)for(var n of u(i))T.call(i,n)&&j(a,n,i[n]);return a};import{r as k,j as t}from"./main-406.js";import{_ as s,L as z}from"./bi.394.85.js";import{a as w}from"./bi.63.852.js";import{T as y,t as E}from"./bi.150.760.js";function V({formID:a,sureCartConf:i,setSureCartConf:n,step:d,setStep:N,isLoading:m,setIsLoading:v,setSnackbar:S,redirectLocation:I,isInfo:o}){const[l,L]=k.useState(!1),[b,p]=k.useState({api_key:""}),{sureCart:e}=E,A=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),N(2)},h=r=>{const x=c({},i),g=c({},b);g[r.target.name]="",x[r.target.name]=r.target.value,p(g),n(x)};return t.jsxs("div",{className:"btcd-stp-page",style:{width:d===1&&900,height:d===1&&"auto"},children:[(e==null?void 0:e.youTubeLink)&&t.jsx(y,{title:e==null?void 0:e.title,youTubeLink:e==null?void 0:e.youTubeLink}),(e==null?void 0:e.docLink)&&t.jsx(y,{title:e==null?void 0:e.title,docLink:e==null?void 0:e.docLink}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:s("Integration Name:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:h,name:"name",value:i.name,type:"text",placeholder:s("Integration Name...","bit-integrations"),disabled:o}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:s("App api key:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:h,name:"api_key",value:i.api_key,type:"text",placeholder:s("Api key...","bit-integrations"),disabled:o}),t.jsx("div",{style:{color:"red"},children:b.api_key}),t.jsxs("small",{className:"d-blk mt-5",children:[s("To get Api key , Please Visit   ","bit-integrations"),t.jsx("a",{className:"btcd-link",href:"https://app.surecart.com/developer",target:"_blank",rel:"noreferrer",children:s("SureCart","bit-integrations")})]}),t.jsx("br",{}),t.jsx("br",{}),!o&&t.jsxs(t.Fragment,{children:[t.jsxs("button",{onClick:()=>w(i,n,p,L,v),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:l||m,children:[l?s("Authorized ✔","bit-integrations"):s("Authorize","bit-integrations"),m&&t.jsx(z,{size:"20",clr:"#022217",className:"ml-2"})]}),t.jsx("br",{}),t.jsxs("button",{onClick:A,className:"btn f-right btcd-btn-lg purple sh-sm flx",type:"button",disabled:!l,children:[s("Next","bit-integrations"),t.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]})]})}export{V as default};
