var f=Object.defineProperty;var p=Object.getOwnPropertySymbols;var k=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable;var x=(t,i,e)=>i in t?f(t,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[i]=e,m=(t,i)=>{for(var e in i||(i={}))k.call(i,e)&&x(t,e,i[e]);if(p)for(var e of p(i))v.call(i,e)&&x(t,e,i[e]);return t};import{j as s,_ as r}from"./main.2.8.10.js";import{b as h}from"./react-router.DMwpH23k.js";import{y as w}from"./Note.DalStCGz.js";import{b as z}from"./theEventsCalendarCommonFunctions.dSRBTcV7.js";import{T as A}from"./TutorialLink.D6K_DiHL.js";import"./react-vendor.P7K3d6op.js";import"./CopyIcn.BnhKHfEP.js";function R({theEventsCalendarConf:t,setTheEventsCalendarConf:i,step:e,setStep:g,loading:a,setLoading:j,isInfo:l}){const[n,N]=h.useState(!1),[o,d]=h.useState({name:""}),y=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),t!=null&&t.default,g(2)},T=c=>{const b=m({},t),u=m({},o);u[c.target.name]="",b[c.target.name]=c.target.value,d(u),i(b)};return s.jsxs("div",{className:"btcd-stp-page",style:{width:e===1&&900,height:e===1&&"auto"},children:[s.jsx(A,{linkKey:"theEventsCalendar"}),s.jsx("div",{className:"mt-3",children:s.jsx("b",{children:r("Integration Name:","bit-integrations")})}),s.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:T,name:"name",value:t.name,type:"text",placeholder:r("Integration Name...","bit-integrations"),disabled:l}),o.name&&s.jsx("div",{style:{color:"red",fontSize:"15px"},children:o.name}),s.jsx("br",{}),!l&&s.jsxs("div",{children:[s.jsxs("button",{onClick:()=>z(t,d,N,a,j),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:n||a.auth,children:[n?r("Connected ✔","bit-integrations"):r("Connect to The Events Calendar","bit-integrations"),a.auth&&s.jsx(w,{size:"20",clr:"#022217",className:"ml-2"})]}),s.jsx("br",{}),s.jsxs("button",{onClick:y,className:"btn ml-auto btcd-btn-lg purple sh-sm flx",type:"button",disabled:!n,children:[r("Next","bit-integrations"),s.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]})]})}export{R as default};
