`).filter(s=>s.search(`INSERTINTO"${t.ConfigurationName}_restrict_access"`)>=0).length:0),j=E(),M=H(),Y=async()=>{S.value&&(h.value=!0,await Z("/api/addWireguardConfiguration",t,async i=>{i.status?(j.newMessage("Server","Configuration restored","success"),await c.getConfigurations(),await M.push(`/configuration/${t.ConfigurationName}/peers`)):h.value=!1}))};return(i,s)=>(n(),r("div",re,[e("form",de,[e("div",ue,[e("h4",ce,[l(o,{t:"Configuration"})])]),e("div",null,[e("label",me,[e("small",null,[l(o,{t:"Protocol"})])]),e("h5",fe,[l(q,{protocol:m.selectedConfigurationBackup.protocol,mini:!0},null,8,["protocol"])])]),e("div",null,[e("label",pe,[e("small",null,[l(o,{t:"Configuration Name"})])]),g(e("input",{type:"text",class:v(["form-control rounded-3",[b.value?"is-valid":"is-invalid"]]),placeholder:"ex. wg1",id:"ConfigurationName","onUpdate:modelValue":s[0]||(s[0]=d=>t.ConfigurationName=d),disabled:"",required:""},null,2),[[_,t.ConfigurationName]]),e("div",ve,[p.value?(n(),r("div",be,x(a.value),1)):(n(),r("div",ge,[l(o,{t:"Configuration name is invalid. Possible reasons:"}),e("ul",_e,[e("li",null,[l(o,{t:"Configuration name already exist."})]),e("li",null,[l(o,{t:"Configuration name can only contain 15 lower/uppercase alphabet, numbers, underscore, equal sign, plus sign, period and hyphen."})])])]))])]),e("div",ke,[e("div",xe,[e("div",null,[e("label",ye,[e("small",null,[l(o,{t:"Private Key"})])]),e("div",he,[g(e("input",{type:"text",class:v(["form-control rounded-start-3",[P.value?"is-valid":"is-invalid"]]),id:"PrivateKey",required:"","onUpdate:modelValue":s[1]||(s[1]=d=>t.PrivateKey=d),disabled:""},null,2),[[_,t.PrivateKey]])])])]),e("div",Ce,[e("div",null,[e("label",Pe,[e("small",null,[l(o,{t:"Public Key"})])]),g(e("input",{type:"text",class:"form-control rounded-3",id:"PublicKey","onUpdate:modelValue":s[2]||(s[2]=d=>t.PublicKey=d),disabled:""},null,512),[[_,t.PublicKey]])])])]),e("div",null,[e("label",we,[e("small",null,[l(o,{t:"Listen Port"})])]),g(e("input",{type:"number",class:v(["form-control rounded-3",[I.value?"is-valid":"is-invalid"]]),placeholder:"0-65353",id:"ListenPort",min:"1",max:"65353","onUpdate:modelValue":s[3]||(s[3]=d=>t.ListenPort=d),disabled:"",required:""},null,2),[[_,t.ListenPort]]),e("div",$e,[p.value?(n(),r("div",Be,x(a.value),1)):(n(),r("div",Ne,[l(o,{t:"Listen Port is invalid. Possible reasons:"}),e("ul",De,[e("li",null,[l(o,{t:"Invalid port."})]),e("li",null,[l(o,{t:"Port is assigned to existing WireGuard Configuration."})])])]))])]),e("div",null,[e("label",Ae,[e("small",null,[l(o,{t:"IP Address/CIDR"})]),e("small",{class:v(["ms-auto",[U.value>0?"text-success":"text-danger"]])},[l(o,{t:U.value+" Available IP Address"},null,8,["t"])],2)]),g(e("input",{type:"text",class:v(["form-control",[L.value?"is-valid":"is-invalid"]]),placeholder:"Ex: 10.0.0.1/24",id:"Address","onUpdate:modelValue":s[4]||(s[4]=d=>t.Address=d),disabled:"",required:""},null,2),[[_,t.Address]]),e("div",Ie,[p.value?(n(),r("div",Le,x(a.value),1)):(n(),r("div",Se,[l(o,{t:"IP Address/CIDR is invalid"})]))])]),e("div",Ue,[e("div",Ke,[e("h2",Re,[e("button",Ve,[l(o,{t:"Optional Settings"})])]),e("div",Oe,[e("div",Te,[e("div",null,[e("label",Ee,[e("small",null,[l(o,{t:"PreUp"})])]),g(e("input",{type:"text",class:"form-control rounded-3",id:"PreUp",disabled:"","onUpdate:modelValue":s[5]||(s[5]=d=>t.PreUp=d)},null,512),[[_,t.PreUp]])]),e("div",null,[e("label",qe,[e("small",null,[l(o,{t:"PreDown"})])]),g(e("input",{type:"text",class:"form-control rounded-3",id:"PreDown",disabled:"","onUpdate:modelValue":s[6]||(s[6]=d=>t.PreDown=d)},null,512),[[_,t.PreDown]])]),e("div",null,[e("label",je,[e("small",null,[l(o,{t:"PostUp"})])]),g(e("input",{type:"text",class:"form-control rounded-3",id:"PostUp",disabled:"","onUpdate:modelValue":s[7]||(s[7]=d=>t.PostUp=d)},null,512),[[_,t.PostUp]])]),e("div",null,[e("label",Me,[e("small",null,[l(o,{t:"PostDown"})])]),g(e("input",{type:"text",class:"form-control rounded-3",id:"PostDown",disabled:"","onUpdate:modelValue":s[8]||(s[8]=d=>t.PostDown=d)},null,512),[[_,t.PostDown]])])])])])])]),e("div",Ye,[e("div",