"use strict";(()=>{var e={};e.id=714,e.ids=[714],e.modules={846:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},4870:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},3295:e=>{e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},9294:e=>{e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},3033:e=>{e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},9646:e=>{e.exports=require("child_process")},8354:e=>{e.exports=require("util")},2333:(e,r,s)=>{s.r(r),s.d(r,{patchFetch:()=>v,routeModule:()=>c,serverHooks:()=>x,workAsyncStorage:()=>d,workUnitAsyncStorage:()=>l});var t={};s.r(t),s.d(t,{POST:()=>p});var n=s(2706),o=s(8203),i=s(5994),a=s(9187),u=s(9269);async function p(e){try{let{action:r,deviceId:s,ipAddress:t,port:n}=await e.json(),o=u.A.getInstance();switch(r){case"enable":{if(!s)return a.NextResponse.json({error:"Device ID is required"},{status:400});let e=await o.enableWirelessDebugging(s);return a.NextResponse.json(e)}case"connect":{if(!t)return a.NextResponse.json({error:"IP address is required"},{status:400});let e=await o.connectToWirelessDevice(t,n);return a.NextResponse.json(e)}case"disconnect":{if(!t)return a.NextResponse.json({error:"IP address is required"},{status:400});let e=await o.disconnectWirelessDevice(t,n);return a.NextResponse.json(e)}default:return a.NextResponse.json({error:"Invalid action"},{status:400})}}catch(e){return console.error("Error handling wireless connection:",e),a.NextResponse.json({error:"Failed to process wireless connection request"},{status:500})}}let c=new n.AppRouteRouteModule({definition:{kind:o.RouteKind.APP_ROUTE,page:"/api/devices/wireless/route",pathname:"/api/devices/wireless",filename:"route",bundlePath:"app/api/devices/wireless/route"},resolvedPagePath:"/Users/saleeh/codes/appmaker/adb-web/src/app/api/devices/wireless/route.ts",nextConfigOutput:"",userland:t}),{workAsyncStorage:d,workUnitAsyncStorage:l,serverHooks:x}=c;function v(){return(0,i.patchFetch)({workAsyncStorage:d,workUnitAsyncStorage:l})}}};var r=require("../../../../webpack-runtime.js");r.C(e);var s=e=>r(r.s=e),t=r.X(0,[994,452,577],()=>s(2333));module.exports=t})();