var I=Object.defineProperty;var h=Object.getOwnPropertySymbols;var T=Object.prototype.hasOwnProperty,P=Object.prototype.propertyIsEnumerable;var x=(e,a,s)=>a in e?I(e,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[a]=s,c=(e,a)=>{for(var s in a||(a={}))T.call(a,s)&&x(e,s,a[s]);if(h)for(var s of h(a))P.call(a,s)&&x(e,s,a[s]);return e};import{_ as i,j as t}from"./main.2.8.10.js";import{b as j}from"./react-router.DMwpH23k.js";import{y as _,a9 as v}from"./Note.DalStCGz.js";import{l as w,g as z}from"./LivestormCommonFunc.BGKM5-TZ.js";import{T as E}from"./TutorialLink.D6K_DiHL.js";import"./react-vendor.P7K3d6op.js";import"./CopyIcn.BnhKHfEP.js";function R({livestormConf:e,setLivestormConf:a,step:s,setStep:k,loading:n,setLoading:b,isInfo:r}){const[l,y]=j.useState(!1),[d,p]=j.useState({api_key:""}),A=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),e!=null&&e.default,k(2),z(e,a,b)},m=o=>{const u=c({},e),g=c({},d);g[o.target.name]="",u[o.target.name]=o.target.value,p(g),a(u)},N=`
            <h4>${i("To Get API Token","bit-integrations")}</h4>
            <ul>
                <li>${i("First go to your Livestorm dashboard.","bit-integrations")}</li>
                <li>${i('Click go to "Account Settings"',"bit-integrations")}</li>
                <li>${i('Then Click "App marketplace"',"bit-integrations")}</li>
                <li>${i('Then Click "Public API" card',"bit-integrations")}</li>
                <li>${i("Then you'll be able to generate your own API tokens","bit-integrations")}</li>
            </ul>`;return t.jsxs("div",{className:"btcd-stp-page",style:{width:s===1&&900,height:s===1&&"auto"},children:[t.jsx(E,{linkKey:"livestorm"}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:i("Integration Name:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:m,name:"name",value:e.name,type:"text",placeholder:i("Integration Name...","bit-integrations"),disabled:r}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:i("API Key:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:m,name:"api_key",value:e.api_key,type:"text",placeholder:i("API Key...","bit-integrations"),disabled:r}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:d.api_key}),t.jsxs("small",{className:"d-blk mt-3",children:[i("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:i("Livestorm API Token","bit-integrations")})]}),t.jsx("br",{}),t.jsx("br",{}),!r&&t.jsxs("div",{children:[t.jsxs("button",{onClick:()=>w(e,a,p,y,n,b),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:l||n.auth,children:[l?i("Authorized ✔","bit-integrations"):i("Authorize","bit-integrations"),n.auth&&t.jsx(_,{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:[i("Next","bit-integrations"),t.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]}),t.jsx(v,{note:N})]})}export{R as default};
