"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[5239],{320761:(e,t,n)=>{n.r(t),n.d(t,{default:()=>a});var l=n(296540),i=n(396785);const a=({activeItem:e})=>l.createElement(i.A,{activeItem:e,key:e?._id})},631293:(e,t,n)=>{n.d(t,{A:()=>A});var l=n(296540),i=n(784045),a=n(469733),r=n(758649),o=n(294303),s=n(711748),c=n(566723),u=n(459449),d=n(454195),p=n(188738),m=n(284428),f=n(116653);const A=function({form:e,name:t,types:n,getDisabledReason:A,onAfterChange:h}){const E=(0,a.useSelector)(s.O9),[g,_]=(0,l.useState)(!1),b=(0,l.useMemo)(()=>(0,i.A)(E.filter(({group_type:e})=>n.includes(e)),({name:e})=>e,"asc").map(({_id:e,name:t,group_type:n})=>{const l=A?.({group_type:n});return{value:e,label:t,disabled:!!l,tooltipDescription:l}}),[A,E,n]),v=(0,m.mQ)();return l.createElement(o.A,{flexDirection:"column",width:"100%"},l.createElement(o.A,{gap:c.kc,alignItems:"flex-start"},b.length?l.createElement(o.A,{flexDirection:"column",width:"100%",flex:1},l.createElement(p.A,{control:e.control,name:t,searchable:!0,options:b,onAfterChange:h})):null,l.createElement(o.A,{height:d.b},l.createElement(r.A,{type:"button",variant:"inline",size:"medium",disabled:v,onClick:()=>_(!0)},l.createElement(u.sA,{id:b.length?"COMMON_NEW":"COMMON_CREATE_NEW"})))),g?l.createElement(f.A,{hideModal:()=>_(!1),handleGroupField:l=>{n.includes(l?.group_type)&&l._id&&(e.setValue(t,l._id),h?.(l._id))},types:n}):null)}},504779:(e,t,n)=>{n.d(t,{A:()=>o});var l=n(271856),i=n(296540),a=n(641777),r=n(284428);const o=({reasons:e,reason:t,children:n,isInteractive:o,noWrap:s})=>{const c=(0,r.pv)(),u=[t,...e||[]].filter(Boolean)[0]||null,d=!!u;return i.createElement(a.A,{isDisabled:{fields:d,labels:d,tooltipIcons:d,tooltipPopovers:!c.fields&&d}},i.createElement(l.A,{description:c.fields?null:u,portal:!0,isInteractive:o,noWrap:s},n))}}}]);