/*! 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.monitoring_bundle_jsonpfunction=window.monitoring_bundle_jsonpfunction||[]).push([[5],{149:function(e,t,n){"use strict";n.r(t),n.d(t,"Expression",(function(){return j}));var a=n(5),r=n.n(a),l=n(15),i=n(7),o=n(0),s=n(49),u=n(47),c=n(48),d=n(40),b=n(2);const j=({ruleParams:e,config:t,setRuleParams:n,dataViews:j,errors:x,defaults:f,expressionConfig:m})=>{var g;const{derivedIndexPattern:p}=Object(s.a)(j,t),O=Object(a.useCallback)((e=>{p&&n("filterQueryText",e),p&&n("filterQuery",Object(u.a)(e,p)||"")}),[n,p]),w=Object(a.useCallback)(Object(l.debounce)(O,500),[O]),h=p?Object(b.jsx)(c.a,{value:e.filterQueryText,derivedIndexPattern:p,onSubmit:O,onChange:w}):Object(b.jsx)(r.a.Fragment,null),v=null!=m&&m.showDuration?Object(b.jsx)(i.EuiFormRow,null,Object(b.jsx)(d.a,{key:"duration",name:"duration",duration:null!==(g=e.duration)&&void 0!==g?g:null==f?void 0:f.duration,label:o.i18n.translate("xpack.monitoring.alerts.legacy.paramDetails.duration.label",{defaultMessage:"In the last"}),errors:x.duration,setRuleParams:n})):Object(b.jsx)(r.a.Fragment,null);return Object(b.jsx)(i.EuiForm,{component:"form"},v,Object(b.jsx)(i.EuiFormRow,{fullWidth:!0,label:o.i18n.translate("xpack.monitoring.alerts.filterLable",{defaultMessage:"Filter"}),helpText:o.i18n.translate("xpack.monitoring.alerts.filterHelpText",{defaultMessage:"Use a KQL expression to limit the scope of your alert trigger."})},h),Object(b.jsx)(i.EuiSpacer,null))};t.default=j}}]);