/*! 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.uptime_bundle_jsonpfunction=window.uptime_bundle_jsonpfunction||[]).push([[12],{120:function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(1),i=a.n(n),o=a(19),c=a(21),l=a(0),s=a(20);const r=({onCancel:e})=>{const{application:t}=Object(c.useKibana)().services;return i.a.createElement(o.EuiConfirmModal,{title:i.a.createElement(i.a.Fragment,null,d," ",i.a.createElement(o.EuiIcon,{type:"cheer"})),onCancel:e,onConfirm:()=>{null==t||t.navigateToApp("synthetics")},confirmButtonText:m,cancelButtonText:u},i.a.createElement("p",null,i.a.createElement(s.FormattedMessage,{id:"xpack.uptime.deprecateNoticeModal.description",defaultMessage:"The Elastic Synthetics integration is deprecated. Instead, you can now monitor endpoints, pages, and user journeys directly in the Synthetics app much more efficiently:"})),i.a.createElement("p",null,i.a.createElement("li",null,i.a.createElement(s.FormattedMessage,{id:"xpack.uptime.deprecateNoticeModal.addPrivateLocations",defaultMessage:"Add private locations against your fleet policies"})),i.a.createElement("li",null,i.a.createElement(s.FormattedMessage,{id:"xpack.uptime.deprecateNoticeModal.manageMonitors",defaultMessage:"Manage lightweight and browser monitors from a single place"})),i.a.createElement("li",null,i.a.createElement(s.FormattedMessage,{id:"xpack.uptime.deprecateNoticeModal.elasticManagedLocations",defaultMessage:"Run monitors in multiple locations managed by Elastic, or from your own private locations"})),i.a.createElement("li",null,i.a.createElement(s.FormattedMessage,{id:"xpack.uptime.deprecateNoticeModal.automateMonitors",defaultMessage:"Automate the creation of your monitors using project monitors"}))),i.a.createElement("p",null,i.a.createElement(s.FormattedMessage,{id:"xpack.uptime.deprecateNoticeModal.forMoreInformation",defaultMessage:"For more information, {docsLink}",values:{docsLink:i.a.createElement(o.EuiLink,{"data-test-subj":"syntheticsDeprecateNoticeModalLink",target:"_blank",href:"https://www.elastic.co/guide/en/observability/current/monitor-uptime-synthetics.html"},p)}})))},d=l.i18n.translate("xpack.uptime.deprecateNoticeModal.headerText",{defaultMessage:"Synthetic Monitoring is now available out of the box in Synthetics"}),u=l.i18n.translate("xpack.uptime.deprecateNoticeModal.goBack",{defaultMessage:"Go back"}),p=l.i18n.translate("xpack.uptime.deprecateNoticeModal.readDocs",{defaultMessage:"read docs."}),m=l.i18n.translate("xpack.uptime.deprecateNoticeModal.goToSynthetics",{defaultMessage:"Go to Synthetics"})},236:function(e,t,a){"use strict";a.r(t),a.d(t,"SyntheticsPolicyEditExtensionWrapper",(function(){return u}));var n,i=a(1),o=a.n(i),c=a(0),l=a(19),s=a(21),r=a(48),d=a(120);!function(e){e.HTTP="http",e.TCP="tcp",e.ICMP="icmp",e.BROWSER="browser"}(n||(n={}));const u=Object(i.memo)((({policy:e,newPolicy:t,onChange:a})=>{var c,u,g,f;const{application:v}=Object(s.useKibana)().services,{package:h}=t,y=Object(i.useCallback)((()=>{null==v||v.navigateToApp("integrations",{path:`/detail/${null==h?void 0:h.name}-${null==h?void 0:h.version}/overview`})}),[v,null==h?void 0:h.name,null==h?void 0:h.version]),M=null===(c=Object(s.useKibana)().services)||void 0===c||null===(u=c.share)||void 0===u||null===(g=u.url)||void 0===g?void 0:g.locators,E=e.inputs.find((e=>!0===e.enabled)),b=null==E||null===(f=E.streams.find((e=>Object.values(n).includes(e.data_stream.dataset))))||void 0===f?void 0:f.vars;let k="";try{k=JSON.parse(null==b?void 0:b.processors.value)[0].add_fields.fields.config_id}catch(e){}const x=function({configId:e,locators:t}){var a,n,o;const[c,l]=Object(i.useState)(void 0),d=null===(a=Object(s.useKibana)().services)||void 0===a||null===(n=a.share)||void 0===n?void 0:n.url.locators,u=null===(o=t||d)||void 0===o?void 0:o.get(r.syntheticsEditMonitorLocatorID);return Object(i.useEffect)((()=>{!async function(){const t=await(null==u?void 0:u.getUrl({configId:e}));l(t)}()}),[u,e]),c}({configId:k,locators:M});return e.is_managed?o.a.createElement(l.EuiCallOut,null,o.a.createElement("p",null,m),o.a.createElement(l.EuiButton,{isLoading:!x,href:x+`?packagePolicyId=${e.id}`,"data-test-subj":"syntheticsEditMonitorButton"},p)):o.a.createElement(d.a,{onCancel:y})}));u.displayName="SyntheticsPolicyEditExtensionWrapper";const p=c.i18n.translate("xpack.uptime.editPackagePolicy.inSynthetics",{defaultMessage:"Edit in Synthetics"}),m=c.i18n.translate("xpack.uptime.editPackagePolicy.inSyntheticsDesc",{defaultMessage:"This package policy is managed by the Synthetics app."})}}]);