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