(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[360],{2912:function(e,a,n){Promise.resolve().then(n.bind(n,7430))},5661:function(e,a,n){"use strict";n.d(a,{VN:function(){return r},Xo:function(){return s},YM:function(){return o},nC:function(){return i},u7:function(){return u}});var l=n(8472);a.ZP=l.Z.create({baseURL:"https://cloud.247tranzact.com/api/",headers:{"Content-Type":"application/json"}});let t="https://cloud.247tranzact.com/api/",s="https://cloud.247tranzact.com/images/",r=t+"market/",i=t+"posts/",u=t+"product/",o=[{label:"Agriculture and Raw material",value:"Agriculture and Raw material"},{label:"Apparel and Accessories",value:"Apparel and Accessories"},{label:"Home and Garden",value:"Home and Garden"},{label:"Beauty & Personal Care",value:"Beauty & Personal Care"},{label:"Consumer Electronics",value:"Consumer Electronics"},{label:"Sports and Entertainment",value:"Sports and Entertainment"},{label:"Packaging and Printing",value:"Packaging and Printing"},{label:"Industrial Machines",value:"Industrial Machines"},{label:"Shoes and Accesories",value:"Shoes and Accesories"},{label:"Vehicle Parts and Accessories",value:"Vehicle Parts and Accessories"},{label:"Furniture",value:"Furniture"},{label:"Home Appliances",value:"Home Appliances"},{label:"Tools and Hardware",value:"Tools and Hardware"},{label:"Tech and Softwares",value:"Tech and Softwares"},{label:"Luggages and Bags",value:"Luggages and Bags"},{label:"Construction & Paints",value:"Construction & Paints"},{label:"Lights & Lighting",value:"Lights & Lighting"},{label:"Health Care and Medical Supplies",value:"Health Care and Medical Supplies"},{label:"School and Office Supplies",value:"School and Office Supplies"},{label:"Renewable Energy",value:"Renewable Energy"},{label:"Food and Beverage",value:"Food and Beverage"},{label:"Chemicals",value:"Chemicals"}]},7430:function(e,a,n){"use strict";n.r(a),n.d(a,{default:function(){return g}});var l=n(7437),t=n(9554),s=n(2399);n(6463);var r=n(5661),i=n(357);let{handlers:u,auth:o,signIn:c,signOut:d}=(0,t.ZP)({basePath:"/api/auth",trustHost:!0,secret:i.env.AUTH_SECRET,session:{strategy:"jwt",maxAge:86400},pages:{signIn:"/auth/sign_in"},providers:[(0,s.Z)({credentials:{Email:{},Password:{}},authorize:async(e,a)=>{let{email:n,password:l}=e;try{let a=await r.ZP.post("/auth/login",e);console.log(a.data);let{email:n,id:l,username:t}=a.data;return{email:n,id:l,name:t}}catch(e){return console.log(e),null}}})],callbacks:{async jwt(e){let{token:a,user:n}=e;return n?{...a,id:n.id}:a},async session(e){let{session:a,token:n}=e;return{...a,user:{...a.user,id:n.id}}}}});async function g(){return(0,l.jsxs)("div",{children:[(0,l.jsx)("h5",{children:"Are you sure you want to sign out?"}),(0,l.jsx)("button",{type:"submit",onClick:()=>d(),children:"Sign out"})]})}}},function(e){e.O(0,[472,152,971,23,744],function(){return e(e.s=2912)}),_N_E=e.O()}]);