var P=Object.defineProperty;var x=Object.getOwnPropertySymbols;var S=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable;var j=(e,s,a)=>s in e?P(e,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[s]=a,d=(e,s)=>{for(var a in s||(s={}))S.call(s,a)&&j(e,a,s[a]);if(x)for(var a of x(s))_.call(s,a)&&j(e,a,s[a]);return e};import{_ as i,j as t}from"./main.2.8.1.js";import{d as y}from"./react-router-dom.9mCuUg3q.js";import{z as T,a9 as z}from"./Note.BeM7sN-p.js";import{d as w,g as E}from"./DemioCommonFunc.CwhlkKok.js";import{t as L}from"./tutorialLinks.kMkIDzcD.js";import{T as A}from"./TutorialLink.BAFX--T3.js";import"./CopyIcn.3gZpHton.js";function M({demioConf:e,setDemioConf:s,step:a,setStep:k,loading:l,setLoading:m,isInfo:n}){const[c,N]=y.useState(!1),{demio:r}=L,[o,h]=y.useState({api_key:"",api_secret:""}),v=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),e!=null&&e.default,k(2),E(e,s,m)},p=b=>{const u=d({},e),g=d({},o);g[b.target.name]="",u[b.target.name]=b.target.value,h(g),s(u)},I=`
            <h4>${i("To Get API Key & API Secret","bit-integrations")}</h4>
            <ul>
                <li>${i("First go to your Demio dashboard.","bit-integrations")}</li>
                <li>${i('Click go to "Settings" from Right Top corner',"bit-integrations")}</li>
                <li>${i('Then Click "API" from the "Settings Menu"',"bit-integrations")}</li>
                <li>${i('Then Click "Generate Api Secret"',"bit-integrations")}</li>
                <li>${i('Then copy "API Authorization Credentials"',"bit-integrations")}</li>
            </ul>`;return t.jsxs("div",{className:"btcd-stp-page",style:{width:a===1&&900,height:a===1&&"auto"},children:[t.jsx(A,{title:"Demio",youTubeLink:r==null?void 0:r.youTubeLink}),t.jsx(A,{title:"Demio",docLink:r==null?void 0:r.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:p,name:"name",value:e.name,type:"text",placeholder:i("Integration Name...","bit-integrations"),disabled:n}),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:p,name:"api_key",value:e.api_key,type:"text",placeholder:i("API Key...","bit-integrations"),disabled:n}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:o.api_key}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:i("API Secret:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:p,name:"api_secret",value:e.api_secret,type:"text",placeholder:i("API Secret...","bit-integrations"),disabled:n}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:o.api_secret}),t.jsxs("small",{className:"d-blk mt-3",children:[i("To Get API Key & API Secret, Please Visit","bit-integrations")," ",t.jsx("a",{className:"btcd-link",href:"https://my.demio.com/manage/settings/api-details",target:"_blank",children:i("Demio API Key & Secret","bit-integrations")})]}),t.jsx("br",{}),t.jsx("br",{}),!n&&t.jsxs("div",{children:[t.jsxs("button",{onClick:()=>w(e,s,h,N,l,m),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:c||l.auth,children:[c?i("Authorized ✔","bit-integrations"):i("Authorize","bit-integrations"),l.auth&&t.jsx(T,{size:"20",clr:"#022217",className:"ml-2"})]}),t.jsx("br",{}),t.jsxs("button",{onClick:v,className:"btn ml-auto btcd-btn-lg purple sh-sm flx",type:"button",disabled:!c,children:[i("Next","bit-integrations"),t.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]}),t.jsx(z,{note:I})]})}export{M as default};
