var z=Object.defineProperty;var j=Object.getOwnPropertySymbols;var E=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable;var k=(a,t,e)=>t in a?z(a,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[t]=e,c=(a,t)=>{for(var e in t||(t={}))E.call(t,e)&&k(a,e,t[e]);if(j)for(var e of j(t))_.call(t,e)&&k(a,e,t[e]);return a};import{r as N,j as s}from"./main-333.js";import{_ as n,L as A}from"./bi.636.93.js";import{b as F,a as I}from"./bi.805.810.js";import{T as y,t as C}from"./bi.318.783.js";function H({formID:a,fluentSupportConf:t,setFluentSupportConf:e,step:d,setstep:L,isLoading:m,setIsLoading:l,setSnackbar:b,redirectLocation:B,isInfo:x}){const[r,p]=N.useState(!1),[T,h]=N.useState({api_key:""}),{fluentSupport:i}=C,v=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),I(t,e,l,b),L(2)},w=o=>{const g=c({},t),u=c({},T);u[o.target.name]="",g[o.target.name]=o.target.value,h(u),e(g)};return s.jsxs("div",{className:"btcd-stp-page",style:{width:d===1&&900,height:d===1&&"auto"},children:[(i==null?void 0:i.youTubeLink)&&s.jsx(y,{title:"Fluent Support",youTubeLink:i==null?void 0:i.youTubeLink}),(i==null?void 0:i.docLink)&&s.jsx(y,{title:"Fluent Support",docLink:i==null?void 0:i.docLink}),s.jsx("div",{className:"mt-3",children:s.jsx("b",{children:n("Integration Name:","bit-integrations")})}),s.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:w,name:"name",value:t.name,type:"text",placeholder:n("Integration Name...","bit-integrations"),disabled:x}),!x&&s.jsxs(s.Fragment,{children:[s.jsxs("button",{onClick:()=>F(t,e,h,p,l,b),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:r||m,children:[r?n("Connected ✔","bit-integrations"):n("Connect to Fluent Support","bit-integrations"),m&&s.jsx(A,{size:"20",clr:"#022217",className:"ml-2"})]}),s.jsx("br",{}),s.jsxs("button",{onClick:v,className:"btn f-right btcd-btn-lg purple sh-sm flx",type:"button",disabled:!r,children:[n("Next","bit-integrations"),s.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]})]})}export{H as default};
