var f=Object.defineProperty;var x=Object.getOwnPropertySymbols;var z=Object.prototype.hasOwnProperty,L=Object.prototype.propertyIsEnumerable;var g=(t,i,e)=>i in t?f(t,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[i]=e,l=(t,i)=>{for(var e in i||(i={}))z.call(i,e)&&g(t,e,i[e]);if(x)for(var e of x(i))L.call(i,e)&&g(t,e,i[e]);return t};import{j as s,_ as n}from"./main.2.8.1.js";import{d as h}from"./react-router-dom.9mCuUg3q.js";import{z as w}from"./Note.BeM7sN-p.js";import{b as A}from"./theEventsCalendarCommonFunctions.V_9ePTS9.js";import{t as I}from"./tutorialLinks.kMkIDzcD.js";import{T as S}from"./TutorialLink.BAFX--T3.js";import"./CopyIcn.3gZpHton.js";function G({theEventsCalendarConf:t,setTheEventsCalendarConf:i,step:e,setStep:j,loading:o,setLoading:N,isInfo:d}){const[a,k]=h.useState(!1),[c,u]=h.useState({name:""}),{theEventsCalendar:r}=I,T=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),t!=null&&t.default,j(2)},y=m=>{const b=l({},t),p=l({},c);p[m.target.name]="",b[m.target.name]=m.target.value,u(p),i(b)};return s.jsxs("div",{className:"btcd-stp-page",style:{width:e===1&&900,height:e===1&&"auto"},children:[r==null?void 0:r.youTubeLink,s.jsx(S,{title:"The Events Calendar",docLink:r==null?void 0:r.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:y,name:"name",value:t.name,type:"text",placeholder:n("Integration Name...","bit-integrations"),disabled:d}),c.name&&s.jsx("div",{style:{color:"red",fontSize:"15px"},children:c.name}),s.jsx("br",{}),!d&&s.jsxs("div",{children:[s.jsxs("button",{onClick:()=>A(t,u,k,o,N),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:a||o.auth,children:[a?n("Connected ✔","bit-integrations"):n("Connect to The Events Calendar","bit-integrations"),o.auth&&s.jsx(w,{size:"20",clr:"#022217",className:"ml-2"})]}),s.jsx("br",{}),s.jsxs("button",{onClick:T,className:"btn ml-auto btcd-btn-lg purple sh-sm flx",type:"button",disabled:!a,children:[n("Next","bit-integrations"),s.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]})]})}export{G as default};
