"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[70340],{363370:(e,t,a)=>{a.d(t,{A:()=>r});var n=a(296540),l=a(928085),E=a(876773);const r=e=>{const t=(0,l.A)(e.to);return n.createElement(E.A,{...e,to:t})}},748152:(e,t,a)=>{a.d(t,{u:()=>E});var n=a(71479),l=a(143811);const E=(0,n.A)(l.A)`
  [class*='iconsContainer-number'] {
    display: none;
  }
`},870340:(e,t,a)=>{a.r(t),a.d(t,{default:()=>w});var n=a(469733),l=a(296540),E=a(951272),r=a(335928),i=a(302167),c=a(457311),s=a(140614),A=a(602021),d=a(60320),m=a(566723),_=a(48925),S=a(391855),o=a(363370),I=a(294303),N=a(689965),R=a(699784),T=a(959341),C=a(329109),D=a(454195),b=a(766624),u=a(143811);const O=({disabled:e})=>l.createElement(I.A,{alignItems:"center",minHeight:D.b},l.createElement(I.A,{alignItems:"center",gap:m.YC},l.createElement(u.A,{type:"realCheckbox",name:"wireless_networks_enabled",disabled:e},l.createElement(R.sA,{id:"COMMON_WIRELESS_NETWORKS"})),l.createElement(b.A,{description:l.createElement(R.sA,{id:"SETTINGS_ADVANCED_RADIUS_PROFILE_FORM_LABEL_ENABLE_WIRELESS_NETWORKS_DESC"})}))),p=({disabled:e})=>l.createElement(I.A,{alignItems:"center",minHeight:D.b},l.createElement(I.A,{alignItems:"center",gap:m.YC},l.createElement(u.A,{type:"realCheckbox",name:"wired_networks_enabled",disabled:e},l.createElement(R.sA,{id:"COMMON_WIRED_NETWORKS"})),l.createElement(b.A,{description:l.createElement(R.sA,{id:"SETTINGS_ADVANCED_RADIUS_PROFILE_FORM_LABEL_ENABLE_WIRED_NETWORKS_DESC"})}))),L=({disabled:e})=>l.createElement(I.A,{alignItems:"center",minHeight:D.b},l.createElement(I.A,{alignItems:"center",gap:m.YC},l.createElement(u.A,{type:"realCheckbox",name:"tunneled_reply",disabled:e},l.createElement(R.sA,{id:"SETTINGS_ADVANCED_RADIUS_SERVER_FORM_LABEL_TUNNELED_REPLY"})),l.createElement(b.A,{description:l.createElement(R.sA,{id:"SETTINGS_ADVANCED_RADIUS_SERVER_FORM_DESCRIPTIONS_TUNNELED_REPLY"})}))),M=({disabled:e})=>l.createElement(u.A,{full:!0,passwordToggle:!0,type:"password",name:"x_secret",variant:"secondary",disabled:e,label:l.createElement(R.sA,{id:"COMMON_SHARED_SECRET"})}),g=({disabled:e})=>l.createElement(u.A,{width:168,type:"number",name:"interim_update_interval",variant:"secondary",contentAfter:l.createElement(R.sA,{id:"COMMON_UNIT_SECONDS"}),disabled:e,label:l.createElement(I.A,{alignItems:"center",gap:m.YC},l.createElement(R.sA,{id:"COMMON_INTERIM_UPDATE_INTERVAL"}),l.createElement(b.A,{description:l.createElement(R.sA,{id:"SETTINGS_ADVANCED_RADIUS_SERVER_FORM_DESCRIPTIONS_ACCOUNTING_INTERIM_INTERVAL"})}))});var U=a(748152);const V=({disabled:e})=>l.createElement(U.u,{width:168,type:"number",name:"auth_port",variant:"secondary",disabled:e,label:l.createElement(I.A,{alignItems:"center",gap:m.YC},l.createElement(R.sA,{id:"SETTINGS_ADVANCED_RADIUS_SERVER_FORM_LABEL_AUTHENTICATION_PORT"}),l.createElement(b.A,{description:l.createElement(R.sA,{id:"SETTINGS_ADVANCED_RADIUS_SERVER_FORM_DESCRIPTION_AUTHENTICATION_PORT"})}))}),h=({disabled:e})=>l.createElement(U.u,{width:168,type:"number",name:"acct_port",variant:"secondary",disabled:e,label:l.createElement(I.A,{alignItems:"center",gap:m.YC},l.createElement(R.sA,{id:"SETTINGS_ADVANCED_RADIUS_SERVER_FORM_LABEL_ACCOUNTING_PORT"}),l.createElement(b.A,{description:l.createElement(R.sA,{id:"SETTINGS_ADVANCED_RADIUS_SERVER_FORM_DESCRIPTION_ACCOUNTING_PORT"})}))}),P="defaultRadiusProfileSidePanelForm",f=({defaultProfile:e,disabled:t})=>{const{resetForm:a,handleSubmit:n,dirty:r,isSubmitting:i,submitForm:c,isValid:s}=(0,E.j7)();return l.createElement("form",{onSubmit:n,style:{height:"100%"},id:P},l.createElement(I.A,{flexDirection:"column",gap:m.xO,width:"100%",overflow:"hidden"},l.createElement(_.A,null,l.createElement(M,{disabled:t})),l.createElement(_.A,{title:l.createElement(R.sA,{id:"SETTINGS_ADVANCED_RADIUS_PROFILE_FORM_TITLE_RADIUS_VLAN"})},l.createElement(p,{disabled:t}),l.createElement(O,{disabled:t})),l.createElement(_.A,null,l.createElement(V,{disabled:t}),l.createElement(h,{disabled:t}),l.createElement(g,{disabled:t}),l.createElement(L,{disabled:t})),l.createElement(N.A,null,l.createElement("div",null,l.createElement(o.A,{to:`${T.Cs}/${T.Ik}`},l.createElement(R.sA,{id:"SETTINGS_LOCAL_CREDENTIALS"}))))),l.createElement(C.A,{onFormCancel:a,allowCancel:r,applyButton:l.createElement(S.A,{isDisabled:t,showLoader:i,label:e?"COMMON_ACTION_APPLY_CHANGES":"COMMON_ACTION_ADD",form:P,onSubmit:c}),isDirty:r,isSubmitting:i,isInvalid:!s}))};var F=a(667368);const w=({activeItem:e})=>{const t=(0,n.useDispatch)(),a=(0,n.useSelector)(i.QC),m=(0,n.useSelector)(A.EL),_=(0,l.useMemo)(()=>(0,d.dE)(e,a),[e,a]),S=(0,l.useCallback)(async(e,{resetForm:a})=>{(0,d.fr)(e,_)&&await t((0,s.updateDefaultRadiusProfile)((0,d.Wo)(e))),(0,d.Ct)(e,_)&&await t((0,c.$I)((0,d.F8)(e))),a({values:e})},[t,_]);return l.createElement(E.l1,{initialValues:_,onSubmit:S,validationSchema:F.sD},l.createElement(l.Fragment,null,l.createElement(r.A,null),l.createElement(f,{defaultProfile:e,disabled:m})))}},876773:(e,t,a)=>{a.d(t,{A:()=>r});var n=a(296540),l=a(758649),E=a(196010);const r=e=>n.createElement(l.A,{component:E.A,variant:"inline",size:"medium",...e})}}]);