(()=>{var e={};e.id=712,e.ids=[712],e.modules={96330:e=>{"use strict";e.exports=require("@prisma/client")},10846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},44870:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},29294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},63033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},89416:(e,r,t)=>{"use strict";t.r(r),t.d(r,{patchFetch:()=>g,routeModule:()=>l,serverHooks:()=>d,workAsyncStorage:()=>m,workUnitAsyncStorage:()=>c});var o={};t.r(o),t.d(o,{GET:()=>u});var a=t(42706),s=t(28203),i=t(45994),n=t(11587),p=t(39187);async function u(e){let{searchParams:r}=new URL(e.url),t=r.get("search")||"",o=r.get("regiao")||"",a=r.get("ramo")||"",s=Number.parseInt(r.get("page")||"1"),i=Number.parseInt(r.get("limit")||"10");try{let e=(await n.A.emprego.findMany({where:{titulo:t?{contains:t}:void 0,regiao:o?{slug:o}:void 0,ramo:a?{slug:a}:void 0},include:{ramo:!0,regiao:!0},orderBy:{createdAt:"desc"},skip:(s-1)*i,take:i})).map(e=>({id:e.id,titulo:e.titulo,localizacao:e.localizacao,tipoVaga:e.tipoVaga,ramo:e.ramo?.nome||"Sem Ramo",regiao:e.regiao?.nome||"Sem Regi\xe3o",imagem:e.imagem}));return p.NextResponse.json(e,{status:200})}catch(e){return console.error("Erro ao buscar empregos:",e),p.NextResponse.json({error:"Erro ao buscar empregos."},{status:500})}}let l=new a.AppRouteRouteModule({definition:{kind:s.RouteKind.APP_ROUTE,page:"/api/empregos/filtrar/mobile/route",pathname:"/api/empregos/filtrar/mobile",filename:"route",bundlePath:"app/api/empregos/filtrar/mobile/route"},resolvedPagePath:"C:\\Users\\guilh\\Desktop\\plataforma-empregos-NextJs-Ts\\app\\api\\empregos\\filtrar\\mobile\\route.ts",nextConfigOutput:"",userland:o}),{workAsyncStorage:m,workUnitAsyncStorage:c,serverHooks:d}=l;function g(){return(0,i.patchFetch)({workAsyncStorage:m,workUnitAsyncStorage:c})}},96487:()=>{},78335:()=>{},11587:(e,r,t)=>{"use strict";t.d(r,{A:()=>o});let o=new(t(96330)).PrismaClient}};var r=require("../../../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),o=r.X(0,[638,452],()=>t(89416));module.exports=o})();