"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[76976],{400749(e,s,i){i.d(s,{u:()=>a});var d=i(247816),l=i(120197);const a=(0,d.A)(l.A)`
  [class*='iconsContainer-number'] {
    display: none;
  }
`},876976(e,s,i){i.r(s),i.d(s,{default:()=>k});var d=i(274934),l=i(977872),a=i(602086),n=i(843871),_=i(593091),t=i(291935),A=i(598990),r=i(463391),E=i(6276),S=i(897166),c=i(681023),I=i(309130),x=i(756782),R=i(555612),N=i(376527),o=i(100978),j=i(535322),T=i(470070),C=i(969288),O=i(753959),D=i(877840),b=i(123821),h=i(479523),u=i(115114),m=i(833466),p=i(304151),L=i(120197);const M=({disabled:e})=>(0,d.jsx)(o.A,{alignItems:"center",minHeight:m.b,children:(0,d.jsxs)(o.A,{alignItems:"center",gap:I.YC,children:[(0,d.jsx)(L.A,{type:"realCheckbox",name:"wireless_networks_enabled",disabled:e,children:(0,d.jsx)(T.sA,{id:"COMMON_WIRELESS_NETWORKS"})}),(0,d.jsx)(p.A,{description:(0,d.jsx)(T.sA,{id:"SETTINGS_ADVANCED_RADIUS_PROFILE_FORM_LABEL_ENABLE_WIRELESS_NETWORKS_DESC"})})]})}),g=({disabled:e})=>(0,d.jsx)(o.A,{alignItems:"center",minHeight:m.b,children:(0,d.jsxs)(o.A,{alignItems:"center",gap:I.YC,children:[(0,d.jsx)(L.A,{type:"realCheckbox",name:"wired_networks_enabled",disabled:e,children:(0,d.jsx)(T.sA,{id:"COMMON_WIRED_NETWORKS"})}),(0,d.jsx)(p.A,{description:(0,d.jsx)(T.sA,{id:"SETTINGS_ADVANCED_RADIUS_PROFILE_FORM_LABEL_ENABLE_WIRED_NETWORKS_DESC"})})]})}),P=({disabled:e})=>(0,d.jsx)(o.A,{alignItems:"center",minHeight:m.b,children:(0,d.jsxs)(o.A,{alignItems:"center",gap:I.YC,children:[(0,d.jsx)(L.A,{type:"realCheckbox",name:"tunneled_reply",disabled:e,children:(0,d.jsx)(T.sA,{id:"SETTINGS_ADVANCED_RADIUS_SERVER_FORM_LABEL_TUNNELED_REPLY"})}),(0,d.jsx)(p.A,{description:(0,d.jsx)(T.sA,{id:"SETTINGS_ADVANCED_RADIUS_SERVER_FORM_DESCRIPTIONS_TUNNELED_REPLY"})})]})}),U=({disabled:e})=>(0,d.jsx)(L.A,{full:!0,passwordToggle:!0,type:"password",name:"x_secret",variant:"secondary",disabled:e,label:(0,d.jsx)(T.sA,{id:"COMMON_SHARED_SECRET"})}),V=({disabled:e})=>(0,d.jsx)(L.A,{width:168,type:"number",name:"interim_update_interval",variant:"secondary",contentAfter:(0,d.jsx)(T.sA,{id:"COMMON_UNIT_SECONDS"}),disabled:e,label:(0,d.jsxs)(o.A,{alignItems:"center",gap:I.YC,children:[(0,d.jsx)(T.sA,{id:"COMMON_INTERIM_UPDATE_INTERVAL"}),(0,d.jsx)(p.A,{description:(0,d.jsx)(T.sA,{id:"SETTINGS_ADVANCED_RADIUS_SERVER_FORM_DESCRIPTIONS_ACCOUNTING_INTERIM_INTERVAL"})})]})});var f=i(400749);const F=({disabled:e})=>(0,d.jsx)(f.u,{width:168,type:"number",name:"auth_port",variant:"secondary",disabled:e,label:(0,d.jsxs)(o.A,{alignItems:"center",gap:I.YC,children:[(0,d.jsx)(T.sA,{id:"SETTINGS_ADVANCED_RADIUS_SERVER_FORM_LABEL_AUTHENTICATION_PORT"}),(0,d.jsx)(p.A,{description:(0,d.jsx)(T.sA,{id:"SETTINGS_ADVANCED_RADIUS_SERVER_FORM_DESCRIPTION_AUTHENTICATION_PORT"})})]})}),w=({disabled:e})=>(0,d.jsx)(f.u,{width:168,type:"number",name:"acct_port",variant:"secondary",disabled:e,label:(0,d.jsxs)(o.A,{alignItems:"center",gap:I.YC,children:[(0,d.jsx)(T.sA,{id:"SETTINGS_ADVANCED_RADIUS_SERVER_FORM_LABEL_ACCOUNTING_PORT"}),(0,d.jsx)(p.A,{description:(0,d.jsx)(T.sA,{id:"SETTINGS_ADVANCED_RADIUS_SERVER_FORM_DESCRIPTION_ACCOUNTING_PORT"})})]})}),y="defaultRadiusProfileSidePanelForm",G=({defaultProfile:e,disabled:s,isControlledByOrchestration:i})=>{const{values:a,resetForm:_,handleSubmit:A,dirty:r,isSubmitting:E,submitForm:S,isValid:c}=(0,n.j7)(),m=(0,l.d4)(t.fX),p=(0,b.B_)(e._id,m);return(0,d.jsxs)("form",{onSubmit:A,style:{height:"100%"},id:y,children:[(0,d.jsx)(D.A,{isDisabled:s||i,children:(0,d.jsxs)(o.A,{flexDirection:"column",gap:I.xO,width:"100%",overflow:"hidden",children:[(0,d.jsxs)(x.A,{children:[i?(0,d.jsx)(h.A,{cloud_template:e.cloud_template,feature:(0,d.jsx)(T.sA,{id:"COMMON_RADIUS_PROFILE"})}):null,(0,d.jsx)(U,{disabled:s}),p&&(0,b.RC)({...e,x_secret:a.x_secret})?(0,d.jsx)(O.A,{children:(0,d.jsx)(T.sA,{id:"SETTINGS_ADVANCED_RADIUS_PROFILE_HOTSPOT_SECRET_TOO_LONG"})}):null]}),(0,d.jsxs)(x.A,{title:(0,d.jsx)(T.sA,{id:"SETTINGS_ADVANCED_RADIUS_PROFILE_FORM_TITLE_RADIUS_VLAN"}),children:[(0,d.jsx)(g,{disabled:s}),(0,d.jsx)(M,{disabled:s})]}),(0,d.jsxs)(x.A,{children:[(0,d.jsx)(F,{disabled:s}),(0,d.jsx)(w,{disabled:s}),(0,d.jsx)(V,{disabled:s}),(0,d.jsx)(P,{disabled:s})]}),(0,d.jsx)(j.A,{children:(0,d.jsx)("div",{children:(0,d.jsx)(N.A,{to:`${C.Cs}/${C.Ik}`,children:(0,d.jsx)(T.sA,{id:"SETTINGS_LOCAL_CREDENTIALS"})})})})]})}),(0,d.jsx)(u.A,{onFormCancel:_,allowCancel:r,applyButton:(0,d.jsx)(R.A,{isDisabled:s||i,showLoader:E,label:e?"COMMON_ACTION_APPLY_CHANGES":"COMMON_ACTION_ADD",form:y,onSubmit:S}),isDirty:r,isSubmitting:E,isInvalid:!c})]})};var v=i(362751);const k=({activeItem:e})=>{const s=(0,l.wA)(),i=(0,l.d4)(t.QC),I=(0,l.d4)(S.EL),x=(0,a.useMemo)(()=>(0,c.dE)(e,i),[e,i]),R=(0,a.useCallback)(async(e,{resetForm:i})=>{(0,c.fr)(e,x)&&await s((0,r.updateDefaultRadiusProfile)((0,c.Wo)(e))),(0,c.Ct)(e,x)&&await s((0,A.$I)((0,c.F8)(e))),i({values:e})},[s,x]);return(0,d.jsx)(n.l1,{initialValues:x,onSubmit:R,validationSchema:v.sD,children:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(_.A,{}),(0,d.jsx)(G,{defaultProfile:e,disabled:I,isControlledByOrchestration:(0,E.A)(e)})]})})}}}]);