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