var _=Object.defineProperty;var x=Object.getOwnPropertySymbols;var S=Object.prototype.hasOwnProperty,T=Object.prototype.propertyIsEnumerable;var j=(e,i,s)=>i in e?_(e,i,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[i]=s,d=(e,i)=>{for(var s in i||(i={}))S.call(i,s)&&j(e,s,i[s]);if(x)for(var s of x(i))T.call(i,s)&&j(e,s,i[s]);return e};import{_ as a,j as t}from"./main.2.8.1.js";import{d as k}from"./react-router-dom.9mCuUg3q.js";import{z as f,a9 as P}from"./Note.BeM7sN-p.js";import{a as L,g as w}from"./VboutCommonFunc.Gg1p24p6.js";import{t as K}from"./tutorialLinks.kMkIDzcD.js";import{T as y}from"./TutorialLink.BAFX--T3.js";import"./CopyIcn.3gZpHton.js";function q({vboutConf:e,setVboutConf:i,step:s,setstep:A,loading:r,setLoading:m,setSnackbar:E,isInfo:l}){const[o,N]=k.useState(!1),[h,p]=k.useState({name:"",auth_token:""}),{vbout:n}=K,z=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),e!=null&&e.default,A(2),e.list_id||w(e,i,r,m)},b=c=>{const u=d({},e),g=d({},h);g[c.target.name]="",u[c.target.name]=c.target.value,p(g),i(u)},I=`
    <h4>${a("Step of get API Key:","bit-integrations")}</h4>
    <ul>
      <li>${a("Goto Settings and click on","bit-integrations")} <a href="https://app.vbout.com/Settings">${a("API Integrations","bit-integrations")}</a></li>
      <li>${a("Copy the <b>Key</b> and paste into <b>API Key</b> field of your authorization form.","bit-integrations")}</li>
      <li>${a("Finally, click <b>Authorize</b> button.","bit-integrations")}</li>
  </ul>
  `;return t.jsxs("div",{className:"btcd-stp-page",style:{width:s===1&&900,height:s===1&&"auto"},children:[t.jsx(y,{title:"VBOUT",youTubeLink:n==null?void 0:n.youTubeLink}),t.jsx(y,{title:"VBOUT",docLink:n==null?void 0:n.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:b,name:"name",value:e.name,type:"text",placeholder:a("Integration Name...","bit-integrations"),disabled:l}),t.jsxs("small",{className:"d-blk mt-3",children:[a("To get API key, please visit","bit-integrations")," ",t.jsx("a",{className:"btcd-link",href:"https://app.vbout.com/Settings",target:"_blank",rel:"noreferrer",children:a("Vbout API Key","bit-integrations")})]}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:a("API Key:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:b,name:"auth_token",value:e.auth_token,type:"text",placeholder:a("API Key...","bit-integrations"),disabled:l}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:h.auth_token}),!l&&t.jsxs("div",{children:[t.jsxs("button",{onClick:()=>L(e,i,p,N,r,m),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:o||r.auth,children:[o?a("Authorized ✔","bit-integrations"):a("Authorize","bit-integrations"),r.auth&&t.jsx(f,{size:"20",clr:"#022217",className:"ml-2"})]}),t.jsx("br",{}),t.jsxs("button",{onClick:z,className:"btn ml-auto btcd-btn-lg purple sh-sm flx",type:"button",disabled:!o,children:[a("Next","bit-integrations"),t.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]}),t.jsx(P,{note:I})]})}export{q as default};
