(()=>{var e={};e.id=931,e.ids=[931],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")},27209:(e,r,t)=>{"use strict";t.r(r),t.d(r,{patchFetch:()=>g,routeModule:()=>c,serverHooks:()=>m,workAsyncStorage:()=>d,workUnitAsyncStorage:()=>l});var o={};t.r(o),t.d(o,{GET:()=>u});var s=t(42706),a=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")||"",s=r.get("ramo")||"";try{let e=(await n.A.emprego.findMany({where:{titulo:t?{contains:t}:void 0,regiao:o?{slug:o}:void 0,ramo:s?{slug:s}:void 0},include:{ramo:!0,regiao:!0},orderBy:{createdAt:"desc"}})).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 c=new s.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/empregos/filtrar/route",pathname:"/api/empregos/filtrar",filename:"route",bundlePath:"app/api/empregos/filtrar/route"},resolvedPagePath:"C:\\Users\\guilh\\Desktop\\plataforma-empregos-NextJs-Ts\\app\\api\\empregos\\filtrar\\route.ts",nextConfigOutput:"",userland:o}),{workAsyncStorage:d,workUnitAsyncStorage:l,serverHooks:m}=c;function g(){return(0,i.patchFetch)({workAsyncStorage:d,workUnitAsyncStorage:l})}},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(27209));module.exports=o})();