var A=Object.defineProperty;var u=Object.getOwnPropertySymbols;var T=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable;var x=(e,s,n)=>s in e?A(e,s,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[s]=n,d=(e,s)=>{for(var n in s||(s={}))T.call(s,n)&&x(e,n,s[n]);if(u)for(var n of u(s))_.call(s,n)&&x(e,n,s[n]);return e};import{j as t,_ as a}from"./main.2.8.10.js";import{b as g}from"./react-router.DMwpH23k.js";import{y as w}from"./Note.DalStCGz.js";import{a as z}from"./TwilioCommonFunc.oRsszp5W.js";import{T as f}from"./TutorialLink.D6K_DiHL.js";import"./react-vendor.P7K3d6op.js";import"./CopyIcn.BnhKHfEP.js";function K({twilioConf:e,setTwilioConf:s,step:n,setstep:j,isLoading:m,setIsLoading:N,setSnackbar:v,isInfo:i}){const[l,k]=g.useState(!1),[r,b]=g.useState({username:"",password:""}),y=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),j(2)},o=c=>{const p=d({},e),h=d({},r);h[c.target.name]="",p[c.target.name]=c.target.value,b(h),s(p)};return t.jsxs("div",{className:"btcd-stp-page",style:{width:n===1&&900,height:n===1&&"auto"},children:[t.jsx(f,{linkKey:"twilio"}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:a("Integration Name:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:o,name:"name",value:e.name,type:"text",placeholder:a("Integration Name...","bit-integrations"),disabled:i}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:a("Account SID:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:o,name:"sid",value:e.sid,type:"text",placeholder:a("Account SID...","bit-integrations"),disabled:i}),t.jsx("div",{style:{color:"red"},children:r.sid}),t.jsxs("small",{className:"d-blk mt-5",children:[a("To get Account SID and Auth Token , Please Visit","bit-integrations")," ",t.jsx("a",{className:"btcd-link",href:"https://console.twilio.com/",target:"_blank",rel:"noreferrer",children:a("Twilio Console","bit-integrations")})]}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:a("Auth Token:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:o,name:"token",value:e.token,type:"text",placeholder:a("Auth Token...","bit-integrations"),disabled:i}),t.jsx("div",{style:{color:"red"},children:r.token}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:a("From:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:o,name:"from_num",value:e.from_num,type:"text",placeholder:a("Phone Number...","bit-integrations"),disabled:i}),t.jsx("div",{style:{color:"red"},children:r.from_num}),!i&&t.jsxs("div",{children:[t.jsxs("button",{onClick:()=>z(e,s,b,k,N,v),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:l||m,children:[l?a("Authorized ✔","bit-integrations"):a("Authorize","bit-integrations"),m&&t.jsx(w,{size:"20",clr:"#022217",className:"ml-2"})]}),t.jsx("br",{}),t.jsxs("button",{onClick:y,className:"btn ml-auto btcd-btn-lg purple sh-sm flx",type:"button",disabled:!l,children:[a("Next","bit-integrations"),t.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]})]})}export{K as default};
