var y=Object.defineProperty;var u=Object.getOwnPropertySymbols;var _=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable;var x=(t,a,r)=>a in t?y(t,a,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[a]=r,c=(t,a)=>{for(var r in a||(a={}))_.call(a,r)&&x(t,r,a[r]);if(u)for(var r of u(a))z.call(a,r)&&x(t,r,a[r]);return t};import{r as j,j as e,_ as s}from"./main-634.js";import{a6 as S}from"./bf-746-82.js";import{N as T}from"./bf-123-109.js";import{h as w}from"./bf-12-183.js";import"./bf-275-83.js";import"./bf-822-108.js";import"./bf-25-81.js";function H({twilioConf:t,setTwilioConf:a,step:r,setstep:b,isLoading:g,setIsLoading:N,setSnackbar:v,isInfo:n}){const[m,A]=j.useState(!1),[l,i]=j.useState({username:"",password:""}),k=()=>{b(2),document.querySelector(".btcd-s-wrp").scrollTop=0},d=o=>{const h=c({},t),p=c({},l);p[o.target.name]="",h[o.target.name]=o.target.value,i(p),a(h)};return e.jsxs("div",{className:"btcd-stp-page",style:{width:r===1&&900,height:r===1&&"auto"},children:[e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:s("Integration Name:")})}),e.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:d,name:"name",value:t.name,type:"text",placeholder:s("Integration Name..."),disabled:n}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:s("Account SID:")})}),e.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:d,name:"sid",value:t.sid,type:"text",placeholder:s("Account SID..."),disabled:n}),e.jsx("div",{style:{color:"red"},children:l.sid}),e.jsxs("small",{className:"d-blk mt-5",children:[s("To get Account SID and Auth Token , Please Visit")," ",e.jsx("a",{className:"btcd-link",href:"https://console.twilio.com/",target:"_blank",rel:"noreferrer",children:s("Twilio Console")})]}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:s("Auth Token:")})}),e.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:d,name:"token",value:t.token,type:"text",placeholder:s("Auth Token..."),disabled:n}),e.jsx("div",{style:{color:"red"},children:l.token}),e.jsx("div",{className:"mt-3",children:e.jsx("b",{children:s("From:")})}),e.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:d,name:"from_num",value:t.from_num,type:"text",placeholder:s("Phone Number..."),disabled:n}),e.jsx("div",{style:{color:"red"},children:l.from_num}),!n&&e.jsxs(e.Fragment,{children:[e.jsx(S,{isAuthorized:m,isLoading:g,handleAuthorize:()=>w(t,a,i,A,N,v)}),e.jsx("br",{}),e.jsx(T,{nextPageHandler:()=>k(),disabled:!m})]})]})}export{H as default};
