var L=Object.defineProperty;var x=Object.getOwnPropertySymbols;var P=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable;var k=(e,a,s)=>a in e?L(e,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[a]=s,b=(e,a)=>{for(var s in a||(a={}))P.call(a,s)&&k(e,s,a[s]);if(x)for(var s of x(a))_.call(a,s)&&k(e,s,a[s]);return e};import{_ as i,j as t}from"./main.2.8.1.js";import{d as j}from"./react-router-dom.9mCuUg3q.js";import{z,a9 as w}from"./Note.BeM7sN-p.js";import{l as v,g as E}from"./LivestormCommonFunc.vzw31SuH.js";import{t as $}from"./tutorialLinks.kMkIDzcD.js";import{T as y}from"./TutorialLink.BAFX--T3.js";import"./CopyIcn.3gZpHton.js";function D({livestormConf:e,setLivestormConf:a,step:s,setStep:A,loading:r,setLoading:d,isInfo:o}){const[l,N]=j.useState(!1),[p,u]=j.useState({api_key:""}),{livestorm:n}=$,T=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),e!=null&&e.default,A(2),E(e,a,d)},m=c=>{const g=b({},e),h=b({},p);h[c.target.name]="",g[c.target.name]=c.target.value,u(h),a(g)},I=`
            <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(y,{title:"Livestorm",youTubeLink:n==null?void 0:n.youTubeLink}),t.jsx(y,{title:"Livestorm",docLink:n==null?void 0:n.docLink}),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:o}),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:o}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:p.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",{}),!o&&t.jsxs("div",{children:[t.jsxs("button",{onClick:()=>v(e,a,u,N,r,d),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:l||r.auth,children:[l?i("Authorized ✔","bit-integrations"):i("Authorize","bit-integrations"),r.auth&&t.jsx(z,{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:!l,children:[i("Next","bit-integrations"),t.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]}),t.jsx(w,{note:I})]})}export{D as default};
