(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,4750,e=>{"use strict";var t=e.i(43476),a=e.i(71645),r=e.i(86964),l=e.i(18566);let s=(0,a.createContext)({});e.s(["LandlordAuthProvider",0,function({children:e}){let[i,n]=(0,a.useState)(null),[o,d]=(0,a.useState)(!0),u=(0,l.useRouter)(),c=async()=>{try{let e=await r.landAuthApi.me();n(e.data.user)}catch(e){n(null)}finally{d(!1)}};(0,a.useEffect)(()=>{c()},[]);let h=async(e,t)=>{await r.landAuthApi.getCsrf(),n((await r.landAuthApi.login(e,t)).data.user),u.push("/landlord/dashboard/empresas")},x=async()=>{await r.landAuthApi.logout(),n(null),(0,r.clearTenant)(),u.push("/landlord/login")};return(0,t.jsx)(s.Provider,{value:{user:i,loading:o,login:h,logout:x},children:e})},"useLandlordAuth",0,()=>(0,a.useContext)(s)])},65546,e=>{"use strict";var t=e.i(43476),a=e.i(4750),r=e.i(27443),l=e.i(18566),s=e.i(46696);let i=["/landlord/login","/landlord/register","/landlord/forgot-password"];e.s(["default",0,function({children:e}){let n=(0,l.usePathname)(),o=i.includes(n||"");return(0,t.jsx)(r.ThemeProvider,{children:(0,t.jsx)(a.LandlordAuthProvider,{children:(0,t.jsxs)("div",{className:"min-h-screen flex flex-col",children:[(0,t.jsx)("main",{className:`flex-1 ${!o?"pt-16":""}`,children:(0,t.jsx)("div",{className:"container mx-auto px-4 py-6",children:e})}),!o&&(0,t.jsx)("footer",{className:"border-t py-4 text-center text-sm text-gray-500",children:(0,t.jsxs)("div",{className:"container mx-auto",children:["© ",new Date().getFullYear()," FacturaJá - Sistema de Gestão de Empresas"]})}),(0,t.jsx)(s.Toaster,{position:"top-right",richColors:!0})]})})})}])}]);