/*! Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one or more contributor license agreements. * Licensed under the Elastic License 2.0; you may not use this file except in compliance with the Elastic License 2.0. */ (window.triggersActionsUi_bundle_jsonpfunction=window.triggersActionsUi_bundle_jsonpfunction||[]).push([[50],{316:function(e,t,l){"use strict";l.r(t);var n=l(1),s=l(3),a=l(2),u=l(0);const o=Object(n.lazy)((()=>l.e(49).then(l.bind(null,313)))),c=s.i18n.translate("xpack.triggersActionsUI.sections.alertsTable.alertsFlyout.paginationLabel",{defaultMessage:"Alert navigation"});t.default=({alert:e,alertsTableConfiguration:t,flyoutIndex:l,flyoutSize:s="m",alertsCount:i,isLoading:j,onClose:r,onPaginate:b,id:d})=>{var O,x;const{header:g,body:f,footer:p}=null!==(O=null==t||null===(x=t.useInternalFlyout)||void 0===x?void 0:x.call(t))&&void 0!==O?O:{header:o,body:null,footer:null},y=function(e){const t=Object(n.useRef)(null);return Object(n.useEffect)((()=>{e&&(t.current=e)})),t.current}(e),C=Object(n.useMemo)((()=>({alert:void 0===e&&null!=y?y:e,id:d,isLoading:j})),[e,d,j]),F=Object(n.useCallback)((()=>f?Object(u.jsx)(n.Suspense,{fallback:null},Object(u.jsx)(f,C)):null),[f,C]),k=Object(n.useCallback)((()=>p?Object(u.jsx)(n.Suspense,{fallback:null},Object(u.jsx)(p,C)):null),[p,C]),E=Object(n.useCallback)((()=>g?Object(u.jsx)(n.Suspense,{fallback:null},Object(u.jsx)(g,C)):null),[g,C]);return Object(u.jsx)(a.EuiFlyout,{onClose:r,size:s,"data-test-subj":"alertsFlyout",ownFocus:!1},j&&Object(u.jsx)(a.EuiProgress,{size:"xs",color:"accent","data-test-subj":"alertsFlyoutLoading"}),Object(u.jsx)(a.EuiFlyoutHeader,{hasBorder:!0},Object(u.jsx)(n.Suspense,{fallback:null},Object(u.jsx)(E,null)),Object(u.jsx)(a.EuiSpacer,{size:"m"}),Object(u.jsx)(a.EuiFlexGroup,{gutterSize:"none",justifyContent:"flexEnd"},Object(u.jsx)(a.EuiFlexItem,{grow:!1},Object(u.jsx)(a.EuiPagination,{"aria-label":c,pageCount:i,activePage:l,onPageClick:b,compressed:!0,"data-test-subj":"alertsFlyoutPagination"})))),Object(u.jsx)(F,null),Object(u.jsx)(k,null))}}}]);