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