var z=Object.defineProperty;var g=Object.getOwnPropertySymbols;var _=Object.prototype.hasOwnProperty,D=Object.prototype.propertyIsEnumerable;var j=(r,e,s)=>e in r?z(r,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):r[e]=s,p=(r,e)=>{for(var s in e||(e={}))_.call(e,s)&&j(r,s,e[s]);if(g)for(var s of g(e))D.call(e,s)&&j(r,s,e[s]);return r};import{_ as i,j as t}from"./main.2.8.1.js";import{d as k}from"./react-router-dom.9mCuUg3q.js";import{B as I}from"./BackIcn._kGL_vVw.js";import{z as f,a9 as L}from"./Note.BeM7sN-p.js";import{d as S}from"./DripCommonFunc.B-uglCy0.js";import{t as E}from"./tutorialLinks.kMkIDzcD.js";import{T as N}from"./TutorialLink.BAFX--T3.js";import"./CopyIcn.3gZpHton.js";function V({formID:r,dripConf:e,setDripConf:s,step:d,setstep:y,isInfo:o,loading:n,setLoading:A}){const{drip:a}=E,[l,w]=k.useState(!1),[c,u]=k.useState({name:"",api_token:""}),b=m=>{const h=p({},e),x=p({},c);x[m.target.name]="",h[m.target.name]=m.target.value,u(x),s(h)},T=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),y(2)},v=`
            <h4>${i("Get Drip Api Token","bit-integrations")}</h4>
            <ul>
                <li>${i("First go to your","bit-integrations")} <a href="https://www.getdrip.com/user/edit" target="_blank">${i("Drip user settings","bit-integrations")}</a>.</li>
                <li>${i('Copy the the API Token from "User Info"',"bit-integrations")}</li>
            </ul>`;return t.jsxs("div",{className:"btcd-stp-page",style:{width:d===1&&900,height:d===1&&"auto"},children:[t.jsx(N,{title:"Drip",youTubeLink:a==null?void 0:a.youTubeLink}),t.jsx(N,{title:"Drip",docLink:a==null?void 0:a.docLink}),t.jsx("div",{className:"mt-3 wdt-200",children:t.jsx("b",{children:i("Integration Name:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:b,name:"name",value:e.name,type:"text",placeholder:i("Integration Name...","bit-integrations"),disabled:o}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:c.name}),t.jsx("div",{className:"mt-3 wdt-250",children:t.jsx("b",{children:i("Drip Api Token:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:b,name:"api_token",value:e.api_token,type:"text",placeholder:i("Access Api Token Key...","bit-integrations"),disabled:o}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:c.api_token}),t.jsxs("small",{className:"d-blk mt-3",children:[i("To Get Drip Api Token, Please Visit","bit-integrations")," ",t.jsx("a",{className:"btcd-link",href:"https://www.getdrip.com/user/edit",target:"_blank",rel:"noreferrer",children:i("Drip User Settings","bit-integrations")})]}),t.jsx("br",{}),t.jsx("br",{}),(n==null?void 0:n.auth)&&t.jsxs("div",{className:"flx mt-5",children:[t.jsx(f,{size:25,clr:"#022217",className:"mr-2"}),"Checking Api Token Key!!!"]}),!o&&t.jsxs(t.Fragment,{children:[t.jsxs("button",{onClick:()=>S(e,s,u,w,n,A),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(f,{size:20,clr:"#022217",className:"ml-2"})]}),t.jsx("br",{}),t.jsxs("button",{onClick:()=>T(),className:"btn f-right btcd-btn-lg purple sh-sm flx",type:"button",disabled:!l,children:[i("Next","bit-integrations"),t.jsx(I,{className:"ml-1 rev-icn"})]})]}),t.jsx(L,{note:v})]})}export{V as default};
