(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[889],{6881:function(n,e,r){Promise.resolve().then(r.bind(r,573))},573:function(n,e,r){"use strict";r.r(e),r.d(e,{ActionButton:function(){return s}});var t=r(7437),o=r(2614),i=r(2265),a=r(5106),c=r(6719);let s=(0,i.forwardRef)((n,e)=>{let{action:r,disabled:o,hideButton:i,catchToast:c=!0,askForConfirmation:s,stopPropagation:d,command:u,icon:f,...p}=n;return(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(a.ActionWrapper,{action:r,disabled:o,askForConfirmation:s,stopPropagation:d,command:u,catchToast:c,triggerOn:["onClick"],icon:f,children:!i&&(0,t.jsx)(l,{icon:f,...p,ref:e})})})});s.displayName="ActionButton";let l=(0,i.forwardRef)((n,e)=>{let{isLoading:r,children:i,hideIcon:a=!0,icon:s,...l}=n;return(0,t.jsxs)(o.z,{type:"button",...l,ref:e,children:[i,!a&&(0,t.jsx)(c.y,{icon:s,className:"ml-2",isLoading:r})]})});l.displayName="InnerButton"},5106:function(n,e,r){"use strict";r.r(e),r.d(e,{ActionWrapper:function(){return m}});var t=r(7437),o=r(8482),i=r(8692),a=r(2265),c=r(9260),s=r(2964),l=r(967);let d=n=>(u({command:n}),null),u=n=>{let{command:e}=n,r=(0,a.useId)(),t=(0,s.b9)(l.G);(0,a.useLayoutEffect)(()=>(t(n=>({...n,[r]:e})),()=>{t(n=>{let{[r]:e,...t}=n;return t})}))},f=n=>{let{children:e,...r}=n;return(0,t.jsx)(d,{...r,children:e})},p=(0,a.forwardRef)((n,e)=>(0,t.jsx)(o.g7,{...n,ref:e}));p.displayName="ActionWrapperSlot";let m=(0,a.forwardRef)((n,e)=>{var r;let{action:o,disabled:a,children:s,catchToast:l,askForConfirmation:d,stopPropagation:u,command:m,triggerOn:h=["onClick"],icon:j,...b}=n,{isLoading:x,trigger:g}=(0,c.Y)({action:o,disabled:a,catchToast:l,askForConfirmation:d,stopPropagation:u});return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(p,{ref:e,disabled:x||a,...b,...Object.fromEntries((0,i.Z)(h,n=>[n,n=>g(void 0,n)])),children:s}),m&&(0,t.jsx)(f,{icon:j,...m,action:o,disabled:x||a,catchToast:l,askForConfirmation:d,stopPropagation:u,children:null!==(r=m.label)&&void 0!==r?r:s})]})});m.displayName="ActionWrapper"}},function(n){n.O(0,[542,589,315,967,971,117,744],function(){return n(n.s=6881)}),_N_E=n.O()}]);