/*! 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([[22,54],{66:function(e,t,n){"use strict";n.r(t),n.d(t,"WEBHOOK_URL_INVALID",(function(){return o})),n.d(t,"MESSAGE_REQUIRED",(function(){return a})),n.d(t,"WEBHOOK_URL_LABEL",(function(){return r}));var s=n(0);const o=s.i18n.translate("xpack.stackConnectors.components.slack.error.invalidWebhookUrlText",{defaultMessage:"Webhook URL is invalid."}),a=s.i18n.translate("xpack.stackConnectors.components.slack..error.requiredSlackMessageText",{defaultMessage:"Message is required."}),r=s.i18n.translate("xpack.stackConnectors.components.slack.webhookUrlTextFieldLabel",{defaultMessage:"Webhook URL"})},96:function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return b})),n(1);var s=n(25),o=n(29),a=n(26),r=n(28),c=n(27),l=n(2),i=n(66),d=n(9);const{urlField:u}=r.fieldValidators,k=e=>({label:i.WEBHOOK_URL_LABEL,helpText:Object(d.jsx)(s.EuiLink,{href:e.links.alerting.slackAction,target:"_blank"},Object(d.jsx)(o.FormattedMessage,{id:"xpack.stackConnectors.components.slack.webhookUrlHelpLabel",defaultMessage:"Create a Slack Webhook URL"})),validations:[{validator:u(i.WEBHOOK_URL_INVALID)}]}),b=({isEdit:e,readOnly:t})=>{const{docLinks:n}=Object(l.useKibana)().services;return Object(d.jsx)(a.UseField,{path:"secrets.webhookUrl",config:k(n),component:c.Field,componentProps:{euiFieldProps:{readOnly:t,"data-test-subj":"slackWebhookUrlInput",fullWidth:!0}}})}}}]);