import{_ as e,u as s}from"./public.js?v=1764233927359";import{_ as t}from"./index.vue_vue_type_script_setup_true_lang.js?v=1764233927359";import{u as a}from"./index238.js?v=1764233927359";import{h as r}from"./php.js?v=1764233927359";import{x as o}from"./page_layout.js?v=1764233927359";import{_ as i}from"./webserver-result.vue_vue_type_script_setup_true_lang.js?v=1764233927359";import{k as n,P as p,e as l,r as u,R as m,V as _,W as c,a3 as d,S as v,U as f}from"./vue.js?v=1764233927359";import{dR as b,dV as g}from"./naive.js?v=1764233927359";import"./common.js?v=1764233927359";import"./__commonjsHelpers__.js?v=1764233927359";const j={class:"p-20px"},w={class:"w-150px"},x=n({__name:"webserver",props:{data:{}},setup(n,{expose:x}){const{t:h}=p(),y=n,{rows:S}=y.data,R=a(),k=l({webServer:"nginx"}),O=u([{label:"Nginx",value:"nginx"},{label:"Apache",value:"apache"},{label:"Openlitespeed",value:"openlitespeed"}]);return x({onConfirm:async({hide:e})=>{const{message:t}=await r({site_list:JSON.stringify(S.map(e=>e.id)),service_type:k.webServer},!1);if(o(t)){const e=t.map(e=>{const[s,t]=Object.entries(e)[0];return{name:s,status:t}});s({title:h("Public.Table.Result"),width:480,data:{message:e},component:i})}R.setRefresh(!0),e()}}),(s,a)=>{const r=g,o=b,i=t,n=e;return _(),m("div",j,[c(i,null,{default:d(()=>[c(o,{label:"Web Server","show-feedback":!1},{default:d(()=>[v("div",w,[c(r,{value:f(k).webServer,"onUpdate:value":a[0]||(a[0]=e=>f(k).webServer=e),options:f(O)},null,8,["value","options"])])]),_:1})]),_:1}),c(n,{class:"mt-16px!"},{default:d(()=>a[1]||(a[1]=[v("li",{class:"text-warning font-bold"},"If there is any custom configuration that may be lost, it is recommended to back up the site configuration ",-1)])),_:1,__:[1]})])}}});export{x as default};
