import{d as k,s as v,e as z,F as T,j as s,f as o,T as p,w as t,z as u,A as c,C as f,E as d,a1 as i}from"./Dyw2fVvW.js";import{I as m}from"./4ryIOjig.js";const y=k({__name:"kill-process",props:{process:{},port:{},size:{}},setup(_){const r=_,a=l=>{$fetch("/api/process/kill-port",{method:"POST",query:{process:"process"in r?r.process:void 0,port:"port"in r?r.port:void 0,signal:l},onResponse:e=>{e.response.ok&&(l==="SIGKILL"?i.success("Process forcefully terminated"):i.success("Process gracefully terminated"))},onResponseError:e=>{const n=e.response._data.message;i.error(n)}})};return(l,e)=>(z(),v(T,null,[s(o(p),null,{default:t(()=>[s(o(u),null,{default:t(()=>[s(o(c),{onClick:e[0]||(e[0]=n=>a("SIGTERM")),variant:"destructive",size:r.size},{default:t(()=>[s(o(m),{icon:"lucide:heart-off"})]),_:1},8,["size"])]),_:1}),s(o(f),null,{default:t(()=>e[2]||(e[2]=[d("Requests a process to terminate gracefully")])),_:1})]),_:1}),s(o(p),null,{default:t(()=>[s(o(u),null,{default:t(()=>[s(o(c),{onClick:e[1]||(e[1]=n=>a("SIGKILL")),variant:"destructive",size:r.size},{default:t(()=>[s(o(m),{icon:"lucide:power-off"})]),_:1},8,["size"])]),_:1}),s(o(f),null,{default:t(()=>e[3]||(e[3]=[d("Forces a process to terminate immediately")])),_:1})]),_:1})],64))}}),C=Object.assign(y,{__name:"UtilityKillProcess"});export{C as K};
