import{r as f,b as i,l as y,d as t,i as o,v as n,A as b,c as d,f as r,t as M,w as B,T as k}from"./index-D9TFXGg6.js";import{_ as w}from"./_plugin-vue_export-helper-DlAUqK2U.js";const x={class:"modal-content"},V={class:"modal-header"},C={class:"modal-body"},S={class:"form-group"},U={class:"form-group"},$={class:"form-group"},z={class:"toggle-switch"},A={key:0,class:"form-group"},D={key:1,class:"form-group"},T={key:2,class:"form-group"},E={class:"form-group"},G={class:"toggle-switch"},N={class:"modal-footer"},j={__name:"SettingsModal",props:{settings:{type:Object,required:!0},isConnected:{type:Boolean,default:!1},isGlobal:{type:Boolean,default:!1}},emits:["close","save"],setup(u,{emit:p}){const v=u,m=p,l=f({...v.settings});function g(){m("save",{...l.value}),m("close")}return(a,e)=>(i(),y(k,{to:"body"},[t("div",{class:"settings-modal",onClick:e[9]||(e[9]=B(s=>a.$emit("close"),["self"]))},[t("div",x,[t("div",V,[e[10]||(e[10]=t("h3",null,"⚙️ 连接设置",-1)),t("button",{class:"close-btn",onClick:e[0]||(e[0]=s=>a.$emit("close"))},"×")]),t("div",C,[t("div",S,[e[11]||(e[11]=t("label",null,"Max FPS (0 为无限制):",-1)),o(t("input",{type:"number","onUpdate:modelValue":e[1]||(e[1]=s=>l.value.fps=s),min:"0",max:"120"},null,512),[[n,l.value.fps,void 0,{number:!0}]])]),t("div",U,[e[12]||(e[12]=t("label",null,"Max Size (0 为无限制):",-1)),o(t("input",{type:"number","onUpdate:modelValue":e[2]||(e[2]=s=>l.value.size=s),min:"0",step:"100"},null,512),[[n,l.value.size,void 0,{number:!0}]]),e[13]||(e[13]=t("small",{class:"hint"},"例如：1080 表示限制最长边为 1080",-1))]),t("div",$,[e[15]||(e[15]=t("label",null,"开启 BWE (动态码率):",-1)),t("div",z,[o(t("input",{type:"checkbox",id:"bwe-toggle","onUpdate:modelValue":e[3]||(e[3]=s=>l.value.bwe=s)},null,512),[[b,l.value.bwe]]),e[14]||(e[14]=t("label",{for:"bwe-toggle"},null,-1))])]),l.value.bwe?(i(),d("div",A,[e[16]||(e[16]=t("label",null,"Min Bitrate (Mbps):",-1)),o(t("input",{type:"number","onUpdate:modelValue":e[4]||(e[4]=s=>l.value.minBitrate=s),min:"1",step:"1"},null,512),[[n,l.value.minBitrate,void 0,{number:!0}]]),e[17]||(e[17]=t("small",{class:"hint"},"默认：2 Mbps",-1))])):r("",!0),l.value.bwe?(i(),d("div",D,[e[18]||(e[18]=t("label",null,"Max Bitrate (Mbps):",-1)),o(t("input",{type:"number","onUpdate:modelValue":e[5]||(e[5]=s=>l.value.maxBitrate=s),min:"1",step:"1"},null,512),[[n,l.value.maxBitrate,void 0,{number:!0}]]),e[19]||(e[19]=t("small",{class:"hint"},"默认：20 Mbps",-1))])):r("",!0),l.value.bwe?r("",!0):(i(),d("div",T,[e[20]||(e[20]=t("label",null,"Bitrate (Mbps):",-1)),o(t("input",{type:"number","onUpdate:modelValue":e[6]||(e[6]=s=>l.value.bitrate=s),min:"1",step:"1"},null,512),[[n,l.value.bitrate,void 0,{number:!0}]]),e[21]||(e[21]=t("small",{class:"hint"},"默认：4 Mbps",-1))])),t("div",E,[e[23]||(e[23]=t("label",null,"开启 Agent Debug 日志:",-1)),t("div",G,[o(t("input",{type:"checkbox",id:"debug-toggle","onUpdate:modelValue":e[7]||(e[7]=s=>l.value.debug=s)},null,512),[[b,l.value.debug]]),e[22]||(e[22]=t("label",{for:"debug-toggle"},null,-1))])])]),t("div",N,[t("button",{class:"btn btn-secondary",onClick:e[8]||(e[8]=s=>a.$emit("close"))},"取消"),t("button",{class:"btn btn-primary",onClick:g},M(u.isGlobal?"保存全局设置":u.isConnected?"保存并重新连接":"保存并连接"),1)])])])]))}},I=w(j,[["__scopeId","data-v-3f156b87"]]);export{I as S};
