var v=Object.defineProperty;var x=Object.getOwnPropertySymbols;var T=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable;var g=(r,e,s)=>e in r?v(r,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):r[e]=s,m=(r,e)=>{for(var s in e||(e={}))T.call(e,s)&&g(r,s,e[s]);if(x)for(var s of x(e))z.call(e,s)&&g(r,s,e[s]);return r};import{_ as i,j as t}from"./main.2.9.0.js";import{b as j}from"./react-router.DMwpH23k.js";import{B as _}from"./BackIcn._8Wofmn2.js";import{y as k,a9 as I}from"./Note.NSUdvR3c.js";import{d as D}from"./DripCommonFunc.U3JxiS4r.js";import{T as S}from"./TutorialLink.CFG7bS5c.js";import"./react-vendor.P7K3d6op.js";import"./CopyIcn.CEA_lFLo.js";function U({formID:r,dripConf:e,setDripConf:s,step:p,setstep:N,isInfo:a,loading:n,setLoading:f}){const[o,y]=j.useState(!1),[l,d]=j.useState({name:"",api_token:""}),h=c=>{const b=m({},e),u=m({},l);u[c.target.name]="",b[c.target.name]=c.target.value,d(u),s(b)},A=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),N(2)},w=`
            <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:p===1&&900,height:p===1&&"auto"},children:[t.jsx(S,{linkKey:"drip"}),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:h,name:"name",value:e.name,type:"text",placeholder:i("Integration Name...","bit-integrations"),disabled:a}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:l.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:h,name:"api_token",value:e.api_token,type:"text",placeholder:i("Access Api Token Key...","bit-integrations"),disabled:a}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:l.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(k,{size:25,clr:"#022217",className:"mr-2"}),"Checking Api Token Key!!!"]}),!a&&t.jsxs(t.Fragment,{children:[t.jsxs("button",{onClick:()=>D(e,s,d,y,n,f),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:o||n.auth,children:[o?i("Authorized ✔","bit-integrations"):i("Authorize","bit-integrations"),n.auth&&t.jsx(k,{size:20,clr:"#022217",className:"ml-2"})]}),t.jsx("br",{}),t.jsxs("button",{onClick:()=>A(),className:"btn f-right btcd-btn-lg purple sh-sm flx",type:"button",disabled:!o,children:[i("Next","bit-integrations"),t.jsx(_,{className:"ml-1 rev-icn"})]})]}),t.jsx(I,{note:w})]})}export{U as default};
