/*!
 * 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 n=this&&this.__createBinding||(Object.create?function(e,t,o,n){void 0===n&&(n=o);var r=Object.getOwnPropertyDescriptor(t,o);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,n,r)}:function(e,t,o,n){void 0===n&&(n=o),e[n]=t[o]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=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)&&n(t,e,o);return r(t,e),t},l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=i(o(9497)),u=i(o(23)),c=l(o(7446)),s=o(6801),d=l(o(4008)),p={width:"330px"},f={display:"none"},b=({onChange:e,name:t,labelPosition:o="top",labelWidth:n,label:r,isDisabled:i=!1,help:l,value:u})=>{let s=[];Array.isArray(u)&&(s=u.map((e=>null!==e&&"object"==typeof e?e.toString():`${e}`)));const[b,v]=a.useState(s),h=a.useCallback(((o,{values:n})=>{v(n),e(o,t,n)}),[e,t]);return a.createElement(d.default,{label:r,labelPosition:o,labelWidth:n,help:l},a.createElement(c.default,{allowNewValues:!0,values:b,onChange:h,disabled:i,inline:!0,style:p,menuStyle:f,placeholder:"",selectAllAppearance:"checkbox"}))},v=Object.assign(Object.assign({},s.BaseEditorPropTypes),{help:u.string,value:u.array,labelPosition:u.oneOf(["top","left"]),isDisabled:u.bool});b.propTypes=v,t.default=b},6801:function(e,t,o){var n=this&&this.__createBinding||(Object.create?function(e,t,o,n){void 0===n&&(n=o);var r=Object.getOwnPropertyDescriptor(t,o);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,n,r)}:function(e,t,o,n){void 0===n&&(n=o),e[n]=t[o]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=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)&&n(t,e,o);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseEditorPropTypes=void 0;const l=i(o(23));t.BaseEditorPropTypes={name:l.string.isRequired,value:l.oneOfType([l.string,l.object,l.arrayOf(l.string)]),context:l.object,label:l.string,labelPosition:l.oneOf(["top","left"]),labelWidth:l.number,onChange:l.func,isAdvanced:l.bool,isDisabled:l.bool,dataSourceBindings:l.object,options:l.object,optionsSchema:l.object}},4008:function(e,t,o){var n=this&&this.__createBinding||(Object.create?function(e,t,o,n){void 0===n&&(n=o);var r=Object.getOwnPropertyDescriptor(t,o);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,n,r)}:function(e,t,o,n){void 0===n&&(n=o),e[n]=t[o]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=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)&&n(t,e,o);return r(t,e),t},l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.AdvancedConfigButton=void 0;const a=i(o(9497)),u=i(o(23)),c=l(o(232)),s=o(6649),d=l(o(6643)),p=o(3563),f=l(o(6379)),b=l(o(7020)),v=l(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;
    }
`,g=(0,c.default)(f.default)`
    display: flex;
    > span {
        display: flex;
        width: 35px;
    }
`,m=(0,c.default)(b.default)`
    color: ${p.variables.contentColorActive} !important;
    &:hover {
        background-color: ${p.variables.interactiveColorOverlayDrag} !important;
    }
`;t.AdvancedConfigButton=({label:e="",onClick:t})=>a.default.createElement(g,{"data-test":`${e}-advanced-config-button-tooltip`,content:(0,s._)("Advanced configurations")},a.default.createElement(m,{"data-test":`${e}-advanced-config-button`,icon:a.default.createElement(d.default,{"data-test":`${e}-advanced-config-button-icon`}),appearance:"subtle",onClick:t}));const y=({"data-test":e,children:o,isAdvanced:n=!1,label:r,hideLabel:i,labelPosition:l,labelWidth:u,tooltip:c,help:s,style:d,error:p,controlsLayout:f,onClick:b,onAdvancedConfigButtonClick:v})=>a.default.createElement(h,{"data-test":null!=e?e:"control-group",label:r,hideLabel:i,labelPosition:l,labelWidth:u,tooltip:c,help:s,error:p,style:d,onClick:b,controlsLayout:f},n?a.Children.toArray(o).filter(Boolean).map((e=>(0,a.cloneElement)(e,{style:{flex:1}}))):o,n?a.default.createElement(t.AdvancedConfigButton,{label:r,onClick:v}):null);y.propTypes={style:u.object,isAdvanced:u.bool,onClick:u.func,onAdvancedConfigButtonClick:u.func},t.default=y},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(n){var r=t[n];if(void 0!==r)return r.exports;var i=t[n]={exports:{}};return e[n].call(i.exports,i,i.exports,o),i.exports}(2117);module.exports=o})();
//# sourceMappingURL=ArrayOfStringsEditor.js.map