/*!
 * Copyright © 2018 Splunk Inc.
 * SPLUNK CONFIDENTIAL – Use or disclosure of this material in whole or
 * in part without a valid written license from Splunk Inc. is PROHIBITED.
 */(()=>{"use strict";var e={2117:function(e,t,o){var r=this&&this.__createBinding||(Object.create?function(e,t,o,r){void 0===r&&(r=o);var n=Object.getOwnPropertyDescriptor(t,o);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,r,n)}:function(e,t,o,r){void 0===r&&(r=o),e[r]=t[o]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),l=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)"default"!==o&&Object.prototype.hasOwnProperty.call(e,o)&&r(t,e,o);return n(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=l(o(9497)),u=a(o(7446)),c=a(o(4008)),s={width:"330px"},d={display:"none"};t.default=({onChange:e,name:t,labelPosition:o="top",labelWidth:r,label:n,isDisabled:l=!1,help:a,value:p})=>{let f=[];Array.isArray(p)&&(f=p.map((e=>null!==e&&"object"==typeof e?e.toString():`${e}`)));const[b,v]=i.useState(f),h=i.useCallback(((o,{values:r})=>{v(r),e(o,t,r)}),[e,t]);return i.createElement(c.default,{label:n,labelPosition:o,labelWidth:r,help:a},i.createElement(u.default,{allowNewValues:!0,values:b,onChange:h,disabled:l,inline:!0,style:s,menuStyle:d,placeholder:"",selectAllAppearance:"checkbox"}))}},4008:function(e,t,o){var r=this&&this.__createBinding||(Object.create?function(e,t,o,r){void 0===r&&(r=o);var n=Object.getOwnPropertyDescriptor(t,o);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,r,n)}:function(e,t,o,r){void 0===r&&(r=o),e[r]=t[o]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),l=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)"default"!==o&&Object.prototype.hasOwnProperty.call(e,o)&&r(t,e,o);return n(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.AdvancedConfigButton=void 0;const i=l(o(9497)),u=l(o(23)),c=a(o(232)),s=o(6649),d=a(o(6643)),p=o(3563),f=a(o(6379)),b=a(o(7020)),v=a(o(9250)),h=(0,c.default)(v.default)`
    margin-top: 0;
    padding: 0;
    // adjust bottom margin according to theme
    margin-bottom: ${p.variables.spacingMedium};
    width: 100%;

    // remove top margin of the first component in control group
    &:first-child {
        margin-top: 0;
    }

    // remove bottom margin of the last component in control group
    &:last-child {
        margin-bottom: 0;
    }
    // remove top padding on label of the first control group
    [data-test='label']:first-of-type {
        padding-top: 0;
    }
`,m=(0,c.default)(f.default)`
    display: flex;
    > span {
        display: flex;
        width: 35px;
    }
`,g=(0,c.default)(b.default)`
    color: ${p.variables.contentColorActive} !important;
    &:hover {
        background-color: ${p.variables.interactiveColorOverlayDrag} !important;
    }
`;t.AdvancedConfigButton=({label:e="",onClick:t})=>i.default.createElement(m,{"data-test":`${e}-advanced-config-button-tooltip`,content:(0,s._)("Advanced configurations")},i.default.createElement(g,{"data-test":`${e}-advanced-config-button`,icon:i.default.createElement(d.default,{"data-test":`${e}-advanced-config-button-icon`}),appearance:"subtle",onClick:t}));const _=({"data-test":e,children:o,isAdvanced:r=!1,label:n,hideLabel:l,labelPosition:a,labelWidth:u,tooltip:c,help:s,style:d,error:p,controlsLayout:f,onClick:b,onAdvancedConfigButtonClick:v})=>i.default.createElement(h,{"data-test":null!=e?e:"control-group",label:n,hideLabel:l,labelPosition:a,labelWidth:u,tooltip:c,help:s,error:p,style:d,onClick:b,controlsLayout:f},r?i.Children.toArray(o).filter(Boolean).map((e=>(0,i.cloneElement)(e,{style:{flex:1}}))):o,r?i.default.createElement(t.AdvancedConfigButton,{label:n,onClick:v}):null);_.propTypes={style:u.object,isAdvanced:u.bool,onClick:u.func,onAdvancedConfigButtonClick:u.func},t.default=_},6643:e=>{e.exports=require("@splunk/react-icons/SlidersDoubleHorizontal")},7020:e=>{e.exports=require("@splunk/react-ui/Button")},9250:e=>{e.exports=require("@splunk/react-ui/ControlGroup")},7446:e=>{e.exports=require("@splunk/react-ui/Multiselect")},6379:e=>{e.exports=require("@splunk/react-ui/Tooltip")},3563:e=>{e.exports=require("@splunk/themes")},6649:e=>{e.exports=require("@splunk/ui-utils/i18n")},23:e=>{e.exports=require("prop-types")},9497:e=>{e.exports=require("react")},232:e=>{e.exports=require("styled-components")}},t={};var o=function o(r){var n=t[r];if(void 0!==n)return n.exports;var l=t[r]={exports:{}};return e[r].call(l.exports,l,l.exports,o),l.exports}(2117);module.exports=o})();
//# sourceMappingURL=ArrayOfStringsEditor.js.map