var _=Object.defineProperty;var x=Object.getOwnPropertySymbols;var z=Object.prototype.hasOwnProperty,T=Object.prototype.propertyIsEnumerable;var g=(e,s,n)=>s in e?_(e,s,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[s]=n,m=(e,s)=>{for(var n in s||(s={}))z.call(s,n)&&g(e,n,s[n]);if(x)for(var n of x(s))T.call(s,n)&&g(e,n,s[n]);return e};import{j as t,_ as i}from"./main.2.8.1.js";import{d as j}from"./react-router-dom.9mCuUg3q.js";import{z as L}from"./Note.BeM7sN-p.js";import{a as w}from"./AirtableCommonFunc.3JRgSmMJ.js";import{t as f}from"./tutorialLinks.kMkIDzcD.js";import{T as k}from"./TutorialLink.BAFX--T3.js";import"./CopyIcn.3gZpHton.js";function q({airtableConf:e,setAirtableConf:s,step:n,setStep:N,loading:r,setLoading:v,isInfo:o}){const[c,A]=j.useState(!1),[d,u]=j.useState({name:"",auth_token:""}),{airtable:a}=f,y=()=>{setTimeout(()=>{document.getElementById("btcd-settings-wrp").scrollTop=0},300),e!=null&&e.default,N(2)},h=l=>{const p=m({},e),b=m({},d);b[l.target.name]="",p[l.target.name]=l.target.value,u(b),s(p)};return t.jsxs("div",{className:"btcd-stp-page",style:{width:n===1&&900,height:n===1&&"auto"},children:[t.jsx(k,{title:"Airtable",youTubeLink:a==null?void 0:a.youTubeLink}),t.jsx(k,{title:"Airtable",docLink:a==null?void 0:a.docLink}),t.jsx("div",{className:"mt-3",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:o}),t.jsx("div",{className:"mt-3",children:t.jsx("b",{children:i("Personal access token:","bit-integrations")})}),t.jsx("input",{className:"btcd-paper-inp w-6 mt-1",onChange:h,name:"auth_token",value:e.auth_token,type:"text",placeholder:i("API Token...","bit-integrations"),disabled:o}),t.jsx("div",{style:{color:"red",fontSize:"15px"},children:d.auth_token}),t.jsxs("small",{className:"d-blk mt-3",children:[i("To Get personal access token, Please Visit","bit-integrations")," ",t.jsx("a",{className:"btcd-link",href:"https://airtable.com/create/tokens",target:"_blank",rel:"noreferrer",children:i("Airtable Personal access tokens","bit-integrations")})]}),t.jsx("br",{}),t.jsx("br",{}),!o&&t.jsxs("div",{children:[t.jsxs("button",{onClick:()=>w(e,s,u,A,r,v,"authentication"),className:"btn btcd-btn-lg purple sh-sm flx",type:"button",disabled:c||r.auth,children:[c?i("Authorized ✔","bit-integrations"):i("Authorize","bit-integrations"),r.auth&&t.jsx(L,{size:"20",clr:"#022217",className:"ml-2"})]}),t.jsx("br",{}),t.jsxs("button",{onClick:y,className:"btn ml-auto btcd-btn-lg purple sh-sm flx",type:"button",disabled:!c,children:[i("Next","bit-integrations"),t.jsx("div",{className:"btcd-icn icn-arrow_back rev-icn d-in-b"})]})]})]})}export{q as default};
