var z=Object.defineProperty;var g=Object.getOwnPropertySymbols;var I=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable;var x=(e,i,s)=>i in e?z(e,i,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[i]=s,c=(e,i)=>{for(var s in i||(i={}))I.call(i,s)&&x(e,s,i[s]);if(g)for(var s of g(i))_.call(i,s)&&x(e,s,i[s]);return e};import{_ as a,j as t}from"./main.2.8.10.js";import{b as j}from"./react-router.DMwpH23k.js";import{y as S,a9 as P}from"./Note.DalStCGz.js";import{a as f,g as K}from"./VboutCommonFunc.Bcusx1Hb.js";import{T as w}from"./TutorialLink.D6K_DiHL.js";import"./react-vendor.P7K3d6op.js";import"./CopyIcn.BnhKHfEP.js";function q({vboutConf:e,setVboutConf:i,step:s,setstep:y,loading:n,setLoading:m,setSnackbar:E,isInfo:r}){const[l,k]=j.useState(!1),[d,b]=j.useState({name:"",auth_token:""}),A=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),e!=null&&e.default,y(2),e.list_id||K(e,i,n,m)},h=o=>{const p=c({},e),u=c({},d);u[o.target.name]="",p[o.target.name]=o.target.value,b(u),i(p)},N=`
    <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(w,{linkKey:"vbout"}),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:h,name:"name",value:e.name,type:"text",placeholder:a("Integration Name...","bit-integrations"),disabled:r}),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:h,name:"auth_token",value:e.auth_token,type:"text",placeholder:a("API Key...","bit-integrations"),disabled:r}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:d.auth_token}),!r&&t.jsxs("div",{children:[t.jsxs("button",{onClick:()=>f(e,i,b,k,n,m),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:l||n.auth,children:[l?a("Authorized ✔","bit-integrations"):a("Authorize","bit-integrations"),n.auth&&t.jsx(S,{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:!l,children:[a("Next","bit-integrations"),t.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]}),t.jsx(P,{note:N})]})}export{q as default};
