/*!
 * 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={8: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(497)),u=l(o(23)),c=a(o(232)),d=o(649),s=a(o(643)),p=o(563),f=a(o(379)),b=a(o(20)),v=a(o(250)),m=(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;
    }
`,h=(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(g,{"data-test":`${e}-advanced-config-button-tooltip`,content:(0,d._)("Advanced configurations")},i.default.createElement(h,{"data-test":`${e}-advanced-config-button`,icon:i.default.createElement(s.default,{"data-test":`${e}-advanced-config-button-icon`}),appearance:"subtle",onClick:t}));const y=({"data-test":e,children:o,isAdvanced:r=!1,label:n,hideLabel:l,labelPosition:a,labelWidth:u,tooltip:c,help:d,style:s,error:p,controlsLayout:f,onClick:b,onAdvancedConfigButtonClick:v})=>i.default.createElement(m,{"data-test":null!=e?e:"control-group",label:n,hideLabel:l,labelPosition:a,labelWidth:u,tooltip:c,help:d,error:p,style:s,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);y.propTypes={style:u.object,isAdvanced:u.bool,onClick:u.func,onAdvancedConfigButtonClick:u.func},t.default=y},643:e=>{e.exports=require("@splunk/react-icons/SlidersDoubleHorizontal")},20:e=>{e.exports=require("@splunk/react-ui/Button")},250:e=>{e.exports=require("@splunk/react-ui/ControlGroup")},379:e=>{e.exports=require("@splunk/react-ui/Tooltip")},563:e=>{e.exports=require("@splunk/themes")},649:e=>{e.exports=require("@splunk/ui-utils/i18n")},23:e=>{e.exports=require("prop-types")},497: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}(8);module.exports=o})();
//# sourceMappingURL=AdvancedControlGroup.js.map