(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9195],{7286:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/blog",function(){return s(5557)}])},9592:function(e,t,s){"use strict";var r=s(5893),l=s(5675),a=s.n(l),n=s(1664),o=s.n(n);t.Z=()=>(0,r.jsxs)("div",{className:"pt-10 w-screen text-xs pb-10 flex flex-row justify-between items-end border-teal-300 border-t shadow-xl shadow-black px-8",children:[(0,r.jsxs)("div",{className:"flex items-start flex-col",children:[(0,r.jsx)(a(),{src:"/Logo.svg",height:100,width:100,alt:"logo"}),(0,r.jsx)(o(),{className:" mt-4 text-white hover:text-blue-400",href:"/faq",children:"FAQ"}),(0,r.jsx)(o(),{className:" mt-1 text-white hover:text-blue-400",href:"/terms",children:"Terms of Service"}),(0,r.jsx)(o(),{className:" mt-1 text-white hover:text-blue-400",href:"/privacy",children:"Privacy Policy"})]}),(0,r.jsxs)("div",{className:"flex flex-col",children:[(0,r.jsx)("p",{className:"font-bold text-lg",children:"Articles"}),(0,r.jsx)(o(),{href:"/blog/Zi5iKgWvPBlJzlxxpp6H",children:"Integrate with HotelBeds"}),(0,r.jsx)(o(),{href:"/blog/IVnrUgCThTGQCMKdFdww",children:"Integrate with Duffel"}),(0,r.jsx)(o(),{href:"/blog/v72vhGPmrxNbNHkIfeSb",children:"Integrate with Widgety"})]}),(0,r.jsx)("p",{className:"text-xs  text-white text-right",children:"\xa9 2024 TRAPI. All rights reserved."})]})},2019:function(e,t,s){"use strict";var r=s(5893),l=s(7294),a=s(9603),n=s(9417),o=s(5675),i=s.n(o),c=s(9332),d=s(3755),h=s(1259),m=s(5990),x=s(1664),u=s.n(x);t.Z=()=>{let[e,t]=(0,l.useState)(!1),s=(0,c.useRouter)(),[o,x]=(0,l.useState)(!1),[f,g]=(0,l.useState)(!1),p=()=>{g(!f)};(0,l.useEffect)(()=>{let e=(0,h.Aj)(d.I8,e=>{x(!!e)});return()=>e()},[]);let b=()=>{t(!e)},j=()=>{s.push("/signUp")},w=()=>{s.push("/dashboard")};return(0,r.jsxs)("div",{className:"h-16 absolute bg-transparent pt-10 pb-20 flex flex-row justify-between items-center px-4 md:px-10 w-full",children:[(0,r.jsx)(i(),{src:"/Logo.svg",height:50,width:135,alt:"logo",onClick:()=>s.push("/"),style:{cursor:"pointer"}}),(0,r.jsxs)("div",{className:"md:flex hidden gap-4",children:[(0,r.jsxs)("div",{className:"flex mr-4 items-center",children:[(0,r.jsx)(u(),{href:"/blog",className:"gradient-home-link text-sm  hover:border-b hover:border-teal-300 px-4",children:"Articles"}),(0,r.jsx)(u(),{href:"/howItWorks",className:"gradient-home-link text-sm  hover:border-b hover:border-teal-300 px-4",children:"How It Works"}),(0,r.jsx)(u(),{href:"/apiCustomers",className:"gradient-home-link text-sm  hover:border-b hover:border-teal-300 px-4",children:"API Customers"}),(0,r.jsx)(u(),{href:"/apiProvider",className:"gradient-home-link text-sm  hover:border-b hover:border-teal-300 px-4",children:"API Providers"})]}),o?(0,r.jsx)("button",{onClick:w,className:"standard-button text-sm font-semibold text-base cursor-hover gradient-button",children:"Dashboard"}):(0,r.jsx)("button",{onClick:j,className:"standard-button text-sm font-inter font-bold text-base cursor-hover gradient-button",children:"Login"}),(0,r.jsx)("button",{onClick:p,className:"gradient-text2 text-sm rounded-full font-semibold font-inter",children:"Book a Demo"})]}),(0,r.jsx)("div",{className:"md:hidden flex items-center",children:(0,r.jsx)("button",{onClick:b,children:(0,r.jsx)(a.G,{icon:n.xiG})})}),e&&(0,r.jsxs)("div",{className:"absolute inset-y-0 right-0 bg-black text-white px-8 py-6 shadow-lg z-50 flex flex-col items-end gap-5 w-2/3 h-screen shadow-lg shadow-black",children:[(0,r.jsx)("div",{className:"md:hidden flex items-center",children:(0,r.jsx)("button",{onClick:b,children:(0,r.jsx)(a.G,{icon:n.NBC})})}),(0,r.jsx)(i(),{src:"/Logo.svg",height:100,width:100,alt:"logo",style:{width:"auto",height:"auto"}}),(0,r.jsx)(u(),{href:"/blog",className:"gradient-home-link",children:"Articles"}),(0,r.jsx)(u(),{href:"/howItWorks",className:"gradient-home-link",children:"How It Works"}),(0,r.jsx)(u(),{href:"/apiCustomers",className:"gradient-home-link",children:"API Customers"}),(0,r.jsx)(u(),{href:"/apiProvider",className:"gradient-home-link",children:"API Providers"}),o?(0,r.jsx)("button",{onClick:w,className:"gradient-button rounded-full bg-white text-black cursor-hover",children:"Dashboard"}):(0,r.jsx)("button",{onClick:j,className:"gradient-button rounded-full bg-white text-black cursor-hover",children:"Login"})]}),f&&(0,r.jsx)(m.U,{onClose:p})]})}},5990:function(e,t,s){"use strict";s.d(t,{U:function(){return o}});var r=s(5893),l=s(7294);s(9603);var a=s(5675),n=s.n(a);let o=e=>{let{onClose:t}=e,[s,a]=(0,l.useState)(!1),[o,i]=(0,l.useState)(!1),c=async e=>{e.preventDefault(),i(!0);let s=new FormData(e.target),r={firstName:s.get("firstName"),surname:s.get("surname"),email:s.get("email"),companyName:s.get("companyName"),website:s.get("website"),message:s.get("message")};if(!r.email){alert("Email is required"),i(!1);return}try{(await fetch("https://api-ai-product-be-1.onrender.com/contact_us_email",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)})).ok?a(!0):console.error("Failed to send email")}catch(e){console.error("Error:",e)}setTimeout(()=>{a(!1),t()},2e3),i(!1)};return(0,r.jsx)("div",{className:"modalBackground text-black flex justify-center items-center",children:s?(0,r.jsxs)("div",{className:"flex bg-white justify-center gap-2 flex-col items-center h-fit w-fit rounded-xl p-12",children:[(0,r.jsx)(n(),{src:"/Logosmall.png",alt:"Uber",width:50,height:50,style:{objectFit:"cover"}}),(0,r.jsx)("p",{className:"text-3xl font-semibold",children:"Sent!"}),(0,r.jsx)("p",{className:"text-sm text-gray-700",children:"We'll get back to you shortly."}),(0,r.jsx)("p",{className:"text-xs text-gray-400 mb-0",children:"This window will close."})]}):o?(0,r.jsxs)("div",{className:"flex bg-white justify-center gap-4 flex-col items-center h-fit w-fit rounded-xl p-12",children:[(0,r.jsx)("div",{className:"spinner"}),(0,r.jsx)("p",{className:"text-xl text-black",children:"Sending message..."})]}):(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)("div",{className:"modalContainer w-11/12 relative flex flex-col md:flex-row bg-gray-100 rounded-lg p-4 gap-4",children:[(0,r.jsxs)("form",{className:"flex flex-col gap-2 bg-gray-200 p-4 rounded-lg w-full md:w-1/2",onSubmit:c,children:[(0,r.jsx)(n(),{src:"/Logosmall.png",alt:"Uber",width:25,height:25,style:{objectFit:"cover"}}),(0,r.jsx)("p",{className:"text-3xl text-left mb-1 font-semibold font-montserrat text-gray-800",children:"Book a Demo with us!"}),(0,r.jsx)("p",{className:"text-sm text-left mb-4 text-gray-600",children:"We love showing how Trapi can dramatically accelerate customer activation timelines to your APIs. We’ll get in touch within 24 hours."}),(0,r.jsx)("input",{name:"firstName",placeholder:"First name",className:"border rounded-lg p-2 text-sm"}),(0,r.jsx)("input",{name:"surname",placeholder:"Surname",className:"border rounded-lg p-2 text-sm"}),(0,r.jsx)("input",{name:"email",placeholder:"Email address*",className:"border rounded-lg p-2 text-sm"}),(0,r.jsx)("input",{placeholder:"Company name",name:"companyName",className:"border rounded-lg p-2 text-sm"}),(0,r.jsx)("input",{name:"website",placeholder:"Website",className:"border rounded-lg p-2 text-sm"}),(0,r.jsx)("textarea",{placeholder:"Any other information",className:"border rounded-lg p-2 text-sm",name:"message",rows:"2"}),(0,r.jsx)("button",{className:"rounded-lg shadow-gray-500 hover:bg-gray-800 shadow-sm p-2 bg-black self-end text-white w-full",children:"Send message"}),(0,r.jsx)("button",{onClick:t,className:"rounded-lg  p-2  self-end text-gray-600 w-full",children:"Close"})]}),(0,r.jsx)("div",{className:"w-full md:w-1/2 flex justify-center items-center",children:(0,r.jsx)("div",{className:"bg-gray-300 rounded-lg w-full h-full flex justify-center items-center overflow-hidden",children:(0,r.jsx)(n(),{src:"/contact-form.png",alt:"Contact Form",layout:"responsive",width:500,height:500,objectFit:"cover",className:"rounded-lg hidden md:block lg:block"})})})]})})})}},3755:function(e,t,s){"use strict";s.d(t,{Ap:function(){return d},I8:function(){return i},db:function(){return c}});var r=s(3977),l=s(9828),a=s(1259),n=s(1427);let o=(0,r.ZF)({apiKey:"AIzaSyB7qVi9yI_k64eBblngJ54v-p3RQ7MAY0s",authDomain:"chronos-c2cfd.firebaseapp.com",projectId:"chronos-c2cfd",storageBucket:"chronos-c2cfd.appspot.com",messagingSenderId:"906292532193",appId:"1:906292532193:web:96f166d687d48d2390b8a0",measurementId:"G-C49RWDPHGJ"}),i=(0,a.v0)(o),c=(0,l.ad)(o),d=new a.GH;(0,n.r)(o)},5557:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return x}});var r=s(5893),l=s(9008),a=s.n(l),n=s(1664),o=s.n(n),i=s(2019),c=s(7294),d=s(5675),h=s.n(d),m=s(9592);function x(){let[e,t]=(0,c.useState)([]);return(0,c.useEffect)(()=>{(async function(){try{let e=await fetch("https://api-ai-product-be-1.onrender.com/api/list");if(!e.ok){let t=await e.text();throw console.error("Error fetching posts:",t),Error("Failed to fetch posts")}let s=await e.json();console.log("Fetched posts:",s),t(s)}catch(e){console.error("Error fetching posts:",e)}})()},[]),console.log("Blog Component - All Posts Data:",e),(0,r.jsxs)("div",{className:"flex flex-col min-h-screen radial-gradient-hiw text-black font-inter",children:[(0,r.jsxs)(a(),{children:[(0,r.jsx)("title",{children:"The Trapi Blog"}),(0,r.jsx)("meta",{name:"description",content:"Boost your API's reach and revenue by joining the TrAPI marketplace. Fast integration, enhanced customer relationships, and streamlined monetization await you."})]}),(0,r.jsx)(i.Z,{}),(0,r.jsx)("div",{className:"flex flex-col items-start  justify-center w-full px-6 py-12 lg:px-24 lg:py-16 my-20",children:(0,r.jsx)("ul",{children:e.length>0?e.map(e=>{let{id:t,date:s,title:l,image:a}=e;return(0,r.jsx)("li",{className:"flex flex-row items-center rounded-lg mb-12",children:(0,r.jsxs)(o(),{className:"flex flex-col md:flex-row lg:flex-row w-full",href:"/blog/".concat(t),children:[(0,r.jsxs)("div",{className:"w-full md:w-1/2 lg:w-1/2 p-4",children:[(0,r.jsx)("p",{className:"text-white font-semibold text-6xl hover:text-teal-300",children:l}),(0,r.jsxs)("small",{className:"text-teal-300",children:["Posted: ",s]})]}),(0,r.jsx)("div",{className:"w-full md:w-1/2 lg:w-1/2 h-40 relative",children:(0,r.jsx)(h(),{src:a,alt:l,layout:"fill",objectFit:"cover",className:"rounded-lg"})})]})},t)}):(0,r.jsx)("p",{children:"No posts available"})})}),(0,r.jsx)(m.Z,{})]})}}},function(e){e.O(0,[4976,2016,7257,9603,387,959,1664,9332,2888,9774,179],function(){return e(e.s=7286)}),_N_E=e.O()}]);