/*! 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([[65],{109:function(e,t,s){"use strict";s.r(t),s.d(t,"default",(function(){return b}));var n=s(25),o=s(27),i=s(28),l=s(26),a=s(33),c=s(1),r=s.n(c),u=s(12),j=s(9);const{urlField:d,emptyField:O}=i.fieldValidators,p=({title:e,dataTestSubj:t})=>Object(j.jsx)(r.a.Fragment,null,Object(j.jsx)(n.EuiSpacer,{size:"s"}),Object(j.jsx)(n.EuiCallOut,{size:"s",iconType:"iInCircle","data-test-subj":t,title:e}),Object(j.jsx)(n.EuiSpacer,{size:"m"})),b=({readOnly:e})=>{return Object(j.jsx)(r.a.Fragment,null,Object(j.jsx)(n.EuiFlexGroup,{justifyContent:"spaceBetween"},Object(j.jsx)(n.EuiFlexItem,null,Object(j.jsx)(p,{title:u.HOW_TO_TEXT,dataTestSubj:"torq-how-to"}))),Object(j.jsx)(n.EuiFlexGroup,{justifyContent:"spaceBetween"},Object(j.jsx)(n.EuiFlexItem,null,Object(j.jsx)(l.UseField,{path:"config.webhookIntegrationUrl",config:{label:u.URL_LABEL,validations:[{validator:d(u.URL_INVALID)},{validator:(t=u.URL_NOT_TORQ_WEBHOOK,(...e)=>{const[{value:s}]=e,n={code:"ERR_FIELD_FORMAT",formatType:"URL",message:t};return Object(a.isUrl)(s)&&"hooks.torq.io"===new URL(s).hostname?void 0:n})}]},helpText:u.URL_HELP_TEXT,component:o.Field,componentProps:{euiFieldProps:{readOnly:e,"data-test-subj":"torqUrlText",fullWidth:!0}}})),Object(j.jsx)(n.EuiFlexItem,null,Object(j.jsx)(l.UseField,{path:"secrets.token",config:{label:u.TORQ_TOKEN_LABEL,validations:[{validator:O(u.TORQ_TOKEN_REQUIRED)}],helpText:u.TORQ_TOKEN_HELP_TEXT},component:o.PasswordField,componentProps:{euiFieldProps:{"data-test-subj":"torqTokenInput",readOnly:e}}}))),Object(j.jsx)(n.EuiSpacer,{size:"m"}),Object(j.jsx)(n.EuiSpacer,{size:"m"}));var t}}}]);