/*! 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.securitySolutionServerless_bundle_jsonpfunction=window.securitySolutionServerless_bundle_jsonpfunction||[]).push([[1],{140:function(e,t,a){e.exports=a.p+"baad30acfe492601d08a0e839c9bb3f5.svg"},45:function(e,t,a){"use strict";a.d(t,"a",(function(){return M}));var n=a(19),s=a.n(n),o=a(3),i=a.n(o),r=a(6),c=a(28),l=a.n(c),u=a(78),d=a(0),j=a(27),b=a(122),g=(a(38),a(5));const p=i.a.createContext(null),m={name:"36bnqj",styles:"display:flex;flex:1"},f=({children:e,navigateToUrl:t,currentAppId:a})=>{const n=Object(o.useRef)(null),s=Object(o.useCallback)((e=>(({event:e,container:t,navigateToUrl:a,currentAppId:n})=>{if(!t||!n)return;const s=((e,t)=>{let a=e;do{var n,s;if("a"===(null===(n=a)||void 0===n?void 0:n.tagName.toLowerCase()))return a;const e=null===(s=a)||void 0===s?void 0:s.parentElement;if(!e||e===document.body||e===t)break;a=e}while(parent||parent!==document.body||parent!==t)})(e.target,t);if(!s)return;const o=s.href,i=""===s.target||"_self"===s.target,r=0===e.button;o&&i&&r&&!e.defaultPrevented&&!(e=>e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)(e)&&(e.preventDefault(),a(s.href))})({event:e,currentAppId:a,navigateToUrl:t,container:n.current})),[a,t]);return Object(g.jsx)("div",{onClick:s,ref:n,css:m},e)},x=({children:e})=>Object(g.jsx)(f,function(){const e=Object(o.useContext)(p);if(!e)throw new Error("RedirectAppLinksContext is missing. Ensure your component or React root is wrapped with RedirectAppLinksProvider.");return e}(),e);var O=a(140),h=a.n(O);const y=d.i18n.translate("sharedUXPackages.card.noData.noPermission.title",{defaultMessage:"Contact your administrator"}),E=d.i18n.translate("sharedUXPackages.card.noData.noPermission.description",{defaultMessage:"This integration is not yet enabled. Your administrator has the required permissions to turn it on."}),P=d.i18n.translate("sharedUXPackages.card.noData.title",{defaultMessage:"Add Elastic Agent"}),v=d.i18n.translate("sharedUXPackages.card.noData.description",{defaultMessage:"Use Elastic Agent for a simple, unified way to collect data from your machines."}),T=()=>Object(g.jsx)(r.EuiImage,{size:"fullWidth",style:{width:"max(100%, 360px)",height:240,objectFit:"cover",background:"aliceblue"},url:h.a,alt:""}),k=({title:e,description:t,canAccessFleet:a,button:n,...o})=>Object(g.jsx)(r.EuiCard,s()({css:{maxWidth:400,marginInline:"auto"},paddingSize:"l",title:a?Object(g.jsx)(r.EuiScreenReaderOnly,null,Object(g.jsx)("span",null,e||P)):Object(g.jsx)(r.EuiTextColor,{color:"default"},y),description:a?t||v:Object(g.jsx)(r.EuiTextColor,{color:"default"},E),footer:(()=>{if(a)return n&&"string"!=typeof n?n:Object(g.jsx)(r.EuiButton,{fill:!0},n||e||P)})(),isDisabled:!a,image:Object(g.jsx)(T,null)},o)),C=i.a.createContext(null),S=({href:e,category:t,description:a,...n})=>{const{canAccessFleet:i,addBasePath:r}=function(){const e=Object(o.useContext)(C);if(!e)throw new Error("NoDataCard Context is missing. Ensure your component or React root is wrapped with NoDataCardContext.");return e}(),c=Object(o.useMemo)((()=>{if(e)return e;const a="/app/integrations/browse";return r(t?`${a}/${t}`:a)}),[r,e,t]);return Object(g.jsx)(x,null,Object(g.jsx)(k,s()({},n,{href:c,canAccessFleet:i,description:a})))},N=({action:e})=>{const t=Object.keys(e);if(1!==t.length)return null;const a=t[0],n="elasticAgent"===a?"empty-page-agent-action":`empty-page-${a}-action`;return Object(g.jsx)(S,s()({key:n},e[a]))},w=({solution:e,logo:t,action:a,docsLink:n,pageTitle:s,className:o})=>{const i=s||d.i18n.translate("sharedUXPackages.noDataPage.welcomeTitle",{defaultMessage:"Welcome to Elastic {solution}!",values:{solution:e}}),c=Object(g.jsx)(r.EuiLink,{href:n,target:"_blank"},Object(g.jsx)(j.FormattedMessage,{id:"sharedUXPackages.noDataPage.intro.link",defaultMessage:"learn more"})),u=Object(g.jsx)(j.FormattedMessage,{id:"sharedUXPackages.noDataPage.intro",defaultMessage:"Add your data to get started, or {link} about {solution}.",values:{solution:e,link:c}});return Object(g.jsx)(r.EuiPageTemplate.Section,{alignment:"center",grow:!0,className:l()("kbnNoDataPageContents",o),"data-test-subj":"kbnNoDataPage"},Object(g.jsx)(r.EuiText,{textAlign:"center"},Object(g.jsx)(b.a,{name:e,iconType:t||`logo${e}`,size:"xxl"}),Object(g.jsx)(r.EuiSpacer,{size:"l"}),Object(g.jsx)("h1",null,i),Object(g.jsx)(r.EuiTextColor,{color:"subdued"},Object(g.jsx)("p",null,u))),Object(g.jsx)(r.EuiSpacer,{size:"xxl"}),Object(g.jsx)(N,{action:a}))},D=e=>{const{className:t,noDataConfig:a,pageSideBar:n,pageSideBarProps:o,...i}=e;if(!a)return null;let c;n&&(c=Object(g.jsx)(r.EuiPageTemplate.Sidebar,o,n));const u=((e,t)=>l()("kbnPageTemplate","",t||""))(0,t);return Object(g.jsx)(r.EuiPageTemplate,s()({className:u,restrictWidth:950,panelled:!1,offset:0,minHeight:0},i),c,Object(g.jsx)(w,a))},A=Object(u.b)(D),U=({className:e,pageHeader:t,children:a,isEmptyState:n,pageSideBar:i,pageSideBarProps:c,...u})=>{let d;const[j,b]=Object(o.useState)();if(Object(o.useEffect)((()=>{const e=document.querySelector('[data-test-subj="kibanaChrome"]');if(e){const t=e.querySelector('[data-test-subj="headerGlobalNav"]');b((null==t?void 0:t.offsetTop)+(null==t?void 0:t.offsetHeight))}}),[]),n&&t&&!a){const{iconType:e,pageTitle:n,description:s,rightSideItems:o}=t,i=n?Object(g.jsx)("h1",null,n):void 0,c=s?Object(g.jsx)("p",null,s):void 0;a=Object(g.jsx)(r.EuiPageTemplate.EmptyPrompt,{iconType:e,iconColor:"",title:i,body:c,actions:o})}else t&&(d=Object(g.jsx)(r.EuiPageTemplate.Header,t));let p;if(i){const e={...c};j&&(e.sticky={offset:j}),p=Object(g.jsx)(r.EuiPageTemplate.Sidebar,e,i)}const m=((e,t)=>l()("kbnPageTemplate","",t||""))(0,e);return Object(g.jsx)(r.EuiPageTemplate,s()({className:m,offset:0,minHeight:0},u),p,d,a)},B=Object(u.b)(U),M=Object.assign((({className:e,children:t,solutionNav:a,noDataConfig:n,...o})=>n&&a?Object(g.jsx)(A,{"data-test-subj":o["data-test-subj"],className:e,noDataConfig:n,solutionNav:a}):n?Object(g.jsx)(D,{"data-test-subj":o["data-test-subj"],className:e,noDataConfig:n}):a?Object(g.jsx)(B,s()({className:e,solutionNav:a,children:t},o)):Object(g.jsx)(U,s()({className:e,children:t},o))),{Sidebar:r.EuiPageTemplate.Sidebar,Header:r.EuiPageTemplate.Header,Section:r.EuiPageTemplate.Section,BottomBar:r.EuiPageTemplate.BottomBar,EmptyPrompt:r.EuiPageTemplate.EmptyPrompt})}}]);