var z=Object.defineProperty;var h=Object.getOwnPropertySymbols;var A=Object.prototype.hasOwnProperty,D=Object.prototype.propertyIsEnumerable;var g=(i,t,s)=>t in i?z(i,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):i[t]=s,m=(i,t)=>{for(var s in t||(t={}))A.call(t,s)&&g(i,s,t[s]);if(h)for(var s of h(t))D.call(t,s)&&g(i,s,t[s]);return i};import{j as e,_ as n}from"./main.2.9.0.js";import{b as j}from"./react-router.DMwpH23k.js";import{B as f}from"./BackIcn._8Wofmn2.js";import{y as S}from"./Note.NSUdvR3c.js";import{i as T}from"./WhatsAppCommonFunc.B69QxICf.js";import{T as B}from"./TutorialLink.CFG7bS5c.js";import"./react-vendor.P7K3d6op.js";import"./CopyIcn.CEA_lFLo.js";function q({formID:i,whatsAppConf:t,setWhatsAppConf:s,step:d,setstep:N,isLoading:b,setIsLoading:v,setSnackbar:I,redirectLocation:E,isInfo:r}){const[o,y]=j.useState(!1),[c,u]=j.useState({dataCenter:"",clientId:""}),k=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),N(2)},a=l=>{const p=m({},t),x=m({},c);x[l.target.name]="",p[l.target.name]=l.target.value,u(x),s(p)};return e.jsxs("div",{className:"btcd-stp-page",style:{width:d===1&&900,height:d===1&&"auto"},children:[e.jsx(B,{linkKey:"whatsApp"}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:n("Integration Name:","bit-integrations")})}),e.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:a,name:"name",value:t.name,type:"text",placeholder:n("Integration Name...","bit-integrations"),disabled:r}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:n("Phone number ID:","bit-integrations")})}),e.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:a,name:"numberID",value:t.numberID,type:"text",placeholder:n("Number ID...","bit-integrations"),disabled:r}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:n("WhatsApp Business Account ID:","bit-integrations")})}),e.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:a,name:"businessAccountID",value:t.businessAccountID,type:"text",placeholder:n("Business Account ID...","bit-integrations"),disabled:r}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:n("Access Token:","bit-integrations")})}),e.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:a,name:"token",value:t.token,type:"text",placeholder:n("Access Token...","bit-integrations"),disabled:r}),e.jsx("div",{style:{color:"red",fontSize:"15px"},children:c.clientId}),e.jsx("div",{style:{color:"red",fontSize:"15px"},children:c.clientSecret}),!r&&e.jsxs(e.Fragment,{children:[e.jsxs("button",{onClick:()=>T(t,s,u,y,v,I),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:o||b,children:[o?n("Authorized ✔","bit-integrations"):n("Authorize","bit-integrations"),b&&e.jsx(S,{size:20,clr:"#022217",className:"ml-2"})]}),e.jsx("br",{}),e.jsxs("button",{onClick:k,className:"btn f-right btcd-btn-lg purple sh-sm flx",type:"button",disabled:!o,children:[n("Next","bit-integrations"),e.jsx(f,{className:"ml-1 rev-icn"})]})]})]})}export{q as default};
