var z=Object.defineProperty;var x=Object.getOwnPropertySymbols;var _=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable;var g=(e,s,n)=>s in e?z(e,s,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[s]=n,m=(e,s)=>{for(var n in s||(s={}))_.call(s,n)&&g(e,n,s[n]);if(x)for(var n of x(s))f.call(s,n)&&g(e,n,s[n]);return e};import{j as t,_ as a}from"./main.2.8.1.js";import{d as j}from"./react-router-dom.9mCuUg3q.js";import{z as L}from"./Note.BeM7sN-p.js";import{a as S}from"./TwilioCommonFunc.CoCgKkwH.js";import{t as w}from"./tutorialLinks.kMkIDzcD.js";import{T as N}from"./TutorialLink.BAFX--T3.js";import"./CopyIcn.3gZpHton.js";function V({twilioConf:e,setTwilioConf:s,step:n,setstep:k,isLoading:b,setIsLoading:v,setSnackbar:y,isInfo:r}){const[c,T]=j.useState(!1),[o,u]=j.useState({username:"",password:""}),{twilio:i}=w,A=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),k(2)},l=d=>{const p=m({},e),h=m({},o);h[d.target.name]="",p[d.target.name]=d.target.value,u(h),s(p)};return t.jsxs("div",{className:"btcd-stp-page",style:{width:n===1&&900,height:n===1&&"auto"},children:[t.jsx(N,{title:"Twilio",youTubeLink:i==null?void 0:i.youTubeLink}),t.jsx(N,{title:"Twilio",docLink:i==null?void 0:i.docLink}),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:l,name:"name",value:e.name,type:"text",placeholder:a("Integration Name...","bit-integrations"),disabled:r}),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:l,name:"sid",value:e.sid,type:"text",placeholder:a("Account SID...","bit-integrations"),disabled:r}),t.jsx("div",{style:{color:"red"},children:o.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:l,name:"token",value:e.token,type:"text",placeholder:a("Auth Token...","bit-integrations"),disabled:r}),t.jsx("div",{style:{color:"red"},children:o.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:l,name:"from_num",value:e.from_num,type:"text",placeholder:a("Phone Number...","bit-integrations"),disabled:r}),t.jsx("div",{style:{color:"red"},children:o.from_num}),!r&&t.jsxs("div",{children:[t.jsxs("button",{onClick:()=>S(e,s,u,T,v,y),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:c||b,children:[c?a("Authorized ✔","bit-integrations"):a("Authorize","bit-integrations"),b&&t.jsx(L,{size:"20",clr:"#022217",className:"ml-2"})]}),t.jsx("br",{}),t.jsxs("button",{onClick:A,className:"btn ml-auto btcd-btn-lg purple sh-sm flx",type:"button",disabled:!c,children:[a("Next","bit-integrations"),t.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]})]})}export{V as default};
