var T=Object.defineProperty;var x=Object.getOwnPropertySymbols;var v=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable;var j=(i,s,a)=>s in i?T(i,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):i[s]=a,m=(i,s)=>{for(var a in s||(s={}))v.call(s,a)&&j(i,a,s[a]);if(x)for(var a of x(s))z.call(s,a)&&j(i,a,s[a]);return i};import{_ as e,j as t}from"./main.2.8.1.js";import{d as g}from"./react-router-dom.9mCuUg3q.js";import{z as w,a9 as E}from"./Note.BeM7sN-p.js";import{g as L}from"./GravitecCommonFunc.B985hQFT.js";import{t as G}from"./tutorialLinks.kMkIDzcD.js";import{T as k}from"./TutorialLink.BAFX--T3.js";import"./CopyIcn.3gZpHton.js";function O({gravitecConf:i,setGravitecConf:s,step:a,setStep:y,loading:p,setLoading:N,isInfo:r}){const[c,S]=g.useState(!1),[l,b]=g.useState({site_url:"",app_key:"",app_secret:""}),{gravitec:n}=G,A=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),i!=null&&i.default,y(2)},o=d=>{const u=m({},i),h=m({},l);h[d.target.name]="",u[d.target.name]=d.target.value,b(h),s(u)},_=`
            <h4>${e("To Get App key & App Secret","bit-integrations")}</h4>
            <ul>
                <li>${e("First go to your Gravitec dashboard.","bit-integrations")}</li>
                <li>${e('Click go to your "YOUR SITES" from left SideBar',"bit-integrations")}</li>
                <li>${e('Then click "Settings"',"bit-integrations")}</li>
                <li>${e('Then Click "REST API"',"bit-integrations")}</li>
            </ul>`;return t.jsxs("div",{className:"btcd-stp-page",style:{width:a===1&&900,height:a===1&&"auto"},children:[t.jsx(k,{title:"Gravitec",youTubeLink:n==null?void 0:n.youTubeLink}),t.jsx(k,{title:"Gravitec",docLink:n==null?void 0:n.docLink}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:e("Integration Name:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:o,name:"name",value:i.name,type:"text",placeholder:e("Integration Name...","bit-integrations"),disabled:r}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:e("Site Url:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:o,name:"site_url",value:i.site_url,type:"text",placeholder:e("Site Url...","bit-integrations"),disabled:r}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:l.site_url}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:e("App key:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:o,name:"app_key",value:i.app_key,type:"text",placeholder:e("App key...","bit-integrations"),disabled:r}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:l.app_key}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:e("App Secret:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:o,name:"app_secret",value:i.app_secret,type:"text",placeholder:e("App Secret...","bit-integrations"),disabled:r}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:l.app_secret}),t.jsxs("small",{className:"d-blk mt-3",children:[e("To Get App key & App Secret, Please Visit","bit-integrations")," ",t.jsx("a",{className:"btcd-link",href:"https://push.gravitec.net/push/1767754253528465408/settings/api",target:"_blank",children:e("Gravitec App key & Secret","bit-integrations")})]}),t.jsx("br",{}),t.jsx("br",{}),!r&&t.jsxs("div",{children:[t.jsxs("button",{onClick:()=>L(i,s,b,S,p,N),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:c||p.auth,children:[c?e("Authorized ✔","bit-integrations"):e("Authorize","bit-integrations"),p.auth&&t.jsx(w,{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:!c,children:[e("Next","bit-integrations"),t.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]}),t.jsx(E,{note:_})]})}export{O as default};
