var L=Object.defineProperty;var m=Object.getOwnPropertySymbols;var P=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable;var k=(a,i,n)=>i in a?L(a,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):a[i]=n,d=(a,i)=>{for(var n in i||(i={}))P.call(i,n)&&k(a,n,i[n]);if(m)for(var n of m(i))_.call(i,n)&&k(a,n,i[n]);return a};import{r as j,j as t}from"./main-406.js";import{_ as s,L as w,N as z}from"./bi.394.85.js";import{l as E,g as S}from"./bi.931.911.js";import{T as y,t as K}from"./bi.150.760.js";function f({livestormConf:a,setLivestormConf:i,step:n,setStep:A,loading:l,setLoading:u,isInfo:r}){const[c,N]=j.useState(!1),[b,p]=j.useState({api_key:""}),{livestorm:e}=K,T=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),a!=null&&a.default,A(2),S(a,i,u)},h=o=>{const x=d({},a),g=d({},b);g[o.target.name]="",x[o.target.name]=o.target.value,p(g),i(x)},I=`
            <h4>To Get API Token</h4>
            <ul>
                <li>First go to your Livestorm dashboard.</li>
                <li>Click go to "Account Settings"</li>
                <li>Then Click "App marketplace"</li>
                <li>Then Click "Public API" card</li>
                <li>Then you'll be able to generate your own API tokens</li>
            </ul>`;return t.jsxs("div",{className:"btcd-stp-page",style:{width:n===1&&900,height:n===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:s("Integration Name:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:h,name:"name",value:a.name,type:"text",placeholder:s("Integration Name...","bit-integrations"),disabled:r}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:s("API Key:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:h,name:"api_key",value:a.api_key,type:"text",placeholder:s("API Key...","bit-integrations"),disabled:r}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:b.api_key}),t.jsxs("small",{className:"d-blk mt-3",children:[s("To Get API Key, Please Visit","bit-integrations")," ",t.jsx("a",{className:"btcd-link",href:"https://app.livestorm.co/#/settings?page=settings&tab=integrations&id=public-api",target:"_blank",children:s("Livestorm API Token","bit-integrations")})]}),t.jsx("br",{}),t.jsx("br",{}),!r&&t.jsxs("div",{children:[t.jsxs("button",{onClick:()=>E(a,i,p,N,l,u),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:c||l.auth,children:[c?s("Authorized ✔","bit-integrations"):s("Authorize","bit-integrations"),l.auth&&t.jsx(w,{size:"20",clr:"#022217",className:"ml-2"})]}),t.jsx("br",{}),t.jsxs("button",{onClick:T,className:"btn ml-auto btcd-btn-lg purple sh-sm flx",type:"button",disabled:!c,children:[s("Next","bit-integrations"),t.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]}),t.jsx(z,{note:I})]})}export{f as default};
