/*! 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.stackConnectors_bundle_jsonpfunction=window.stackConnectors_bundle_jsonpfunction||[]).push([[49],{89:function(e,t,a){"use strict";a.r(t),a.d(t,"ServerLogParamsFields",(function(){return i})),a.d(t,"default",(function(){return i}));var s=a(1),l=a.n(s),n=a(0),o=a(25),r=a(2),u=a(9);const i=({actionParams:e,editAction:t,index:a,errors:i,messageVariables:c,defaultMessage:g,useDefaultMessage:d})=>{const{message:f,level:v}=e;Object(s.useEffect)((()=>{e.level||t("level","info",a)}),[]);const[[b,m],x]=Object(s.useState)([!1,g]);return Object(s.useEffect)((()=>{(d||null==e||!e.message||b&&(null==e?void 0:e.message)===m&&m!==g)&&(x([!0,g]),t("message",g,a))}),[g]),Object(u.jsx)(l.a.Fragment,null,Object(u.jsx)(o.EuiFormRow,{id:"loggingLevel",fullWidth:!0,label:n.i18n.translate("xpack.stackConnectors.components.serverLog.logLevelFieldLabel",{defaultMessage:"Level"})},Object(u.jsx)(o.EuiSelect,{fullWidth:!0,id:"loggLevelSelect","data-test-subj":"loggingLevelSelect",options:[{value:"trace",text:"Trace"},{value:"debug",text:"Debug"},{value:"info",text:"Info"},{value:"warn",text:"Warning"},{value:"error",text:"Error"},{value:"fatal",text:"Fatal"}],value:v,defaultValue:"info",onChange:e=>{t("level",e.target.value,a)}})),Object(u.jsx)(r.TextAreaWithMessageVariables,{index:a,editAction:t,messageVariables:c,paramsProperty:"message",inputTargetValue:f,label:n.i18n.translate("xpack.stackConnectors.components.serverLog.logMessageFieldLabel",{defaultMessage:"Message"}),errors:i.message}))}}}]);