/*! 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.threatIntelligence_bundle_jsonpfunction=window.threatIntelligence_bundle_jsonpfunction||[]).push([[3],{65:function(e,t,s){"use strict";s.r(t),s.d(t,"initComponent",(function(){return x}));var i=s(1),a=s.n(i),c=s(3),n=s(4),r=s(95),o=s(55),d=s(8),j=s(76);var u=s(0);const l=({id:e,metadata:t})=>{const[s,l]=Object(i.useState)(!1),{indicator:x,isLoading:b}=(e=>{const{services:{data:{search:t}}}=Object(d.b)(),s=Object(i.useMemo)((()=>(({searchService:e,inspectorAdapter:t})=>async({indicatorId:s},i)=>{const a={bool:{must:[{ids:{values:[s]}}]}},{hits:{hits:[c]}}=await Object(j.a)(e,{params:{body:{query:a,fields:[{field:"*",include_unmapped:!0}],size:1}}},{inspectorAdapter:t,requestName:`Fetch indicator by Id (${s})`,signal:i,skipDefaultStrategy:!0});return c})({searchService:t})),[t]),{isLoading:a,data:c}=Object(o.useQuery)(["indicatorById",{indicatorId:e}],(({signal:e,queryKey:[t,i]})=>s(i,e)));return{indicator:c,isLoading:a}})(e),{indicatorName:g,indicatorType:O,indicatorFeedName:m}=t,p=Object(i.useMemo)((()=>s?Object(u.jsx)(r.a,{indicator:x,closeFlyout:()=>l(!1),kqlBarIntegration:!0,indicatorName:g}):null),[s,x,g]);return b?Object(u.jsx)(c.EuiLoadingLogo,{"data-test-subj":"tiCasesLoadingLogo",logo:"logoSecurity",size:"xl"}):Object(u.jsx)(a.a.Fragment,null,Object(u.jsx)(c.EuiFlexGroup,{css:{padding:"12px 24px"},gutterSize:"s",direction:"column"},Object(u.jsx)(c.EuiFlexGroup,{gutterSize:"s"},Object(u.jsx)(c.EuiFlexItem,{grow:!1},Object(u.jsx)(c.EuiText,{size:"s"},Object(u.jsx)("strong",null,Object(u.jsx)(n.FormattedMessage,{id:"xpack.threatIntelligence.cases.indicatorName",defaultMessage:"Indicator name:"})))),Object(u.jsx)(c.EuiFlexItem,{grow:!1},Object(u.jsx)(c.EuiText,{size:"s"},Object(u.jsx)(c.EuiLink,{"data-test-subj":"tiCasesIndicatorName",onClick:()=>l(!0)},g)," "))),Object(u.jsx)(c.EuiFlexGroup,{gutterSize:"s"},Object(u.jsx)(c.EuiFlexItem,{grow:!1},Object(u.jsx)(c.EuiText,{size:"s"},Object(u.jsx)("strong",null,Object(u.jsx)(n.FormattedMessage,{id:"xpack.threatIntelligence.cases.indicatorFeedName",defaultMessage:"Feed name:"})))),Object(u.jsx)(c.EuiFlexItem,{grow:!1},Object(u.jsx)(c.EuiText,{size:"s"},Object(u.jsx)("p",{"data-test-subj":"tiCasesIndicatorFeedName"},m)))),Object(u.jsx)(c.EuiFlexGroup,{gutterSize:"s"},Object(u.jsx)(c.EuiFlexItem,{grow:!1},Object(u.jsx)(c.EuiText,{size:"s"},Object(u.jsx)("strong",null,Object(u.jsx)(n.FormattedMessage,{id:"xpack.threatIntelligence.cases.indicatorType",defaultMessage:"Indicator type:"})))),Object(u.jsx)(c.EuiFlexItem,{grow:!1},Object(u.jsx)(c.EuiText,{size:"s"},Object(u.jsx)("p",{"data-test-subj":"tiCasesIndicatorTYPE"},O))))),p)},x=()=>e=>{const t=e.externalReferenceId,s=e.externalReferenceMetadata;return Object(u.jsx)(l,{id:t,metadata:s})};t.default=x()}}]);