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