/*!
 * 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={2468:function(e,t,r){var o=this&&this.__createBinding||(Object.create?function(e,t,r,o){void 0===o&&(o=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,o,n)}:function(e,t,r,o){void 0===o&&(o=r),e[o]=t[r]}),n=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 r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&o(t,e,r);return n(t,e),t},u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=i(r(9497)),l=i(r(23)),s=r(6649),c=u(r(9250)),f=u(r(7020)),d=u(r(1551)),p=u(r(1151)),{useRef:b,useState:_,useCallback:h}=a,m={label:l.string,labelPosition:l.oneOf(["top","left"]),labelWidth:l.number,onResetToDefault:l.func},v=({label:e,labelPosition:t="left",labelWidth:r,onResetToDefault:o})=>{const[n,i]=_(!1),u=b(null),l=h((()=>i(!0)),[]),m=h((()=>i(!1)),[]);return a.createElement(c.default,{label:(0,s._)(e),labelPosition:t,labelWidth:r},a.createElement(f.default,{"data-test":"customized-in-source-button",onClick:l,appearance:"default",ref:u,label:(0,s._)("Customized in source")}),a.createElement(d.default,{"data-test":"customized-in-source-popover",open:n,anchor:u.current,onRequestClose:m,defaultPlacement:"horizontal"},a.createElement(p.default,{onResetToDefault:o})))};v.propTypes=m,t.default=v},1151:function(e,t,r){var o=this&&this.__createBinding||(Object.create?function(e,t,r,o){void 0===o&&(o=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,o,n)}:function(e,t,r,o){void 0===o&&(o=r),e[o]=t[r]}),n=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 r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&o(t,e,r);return n(t,e),t},u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=i(r(9497)),l=i(r(23)),s=r(6649),c=u(r(232)),f=u(r(4566)),d=u(r(6447)),p=u(r(7020)),b=(0,s._)("Dynamic Option: Customized in source"),_=(0,s._)("Configured in source code beyond what can be shown here. Resetting to default will overwrite this custom configurations."),h=(0,s._)("Reset to default"),m=c.default.div`
    padding: ${({padding:e})=>null!=e?e:"20px"};
    width: ${({width:e})=>null!=e?e:"300px"};
    color: ${f.default.contentColorActive};
`,v=c.default.div`
    font-weight: 600;
    font-size: 14px;
    line-height: 20px;
    margin-bottom: 10px;
`,g={headerText:l.string,info:l.string,resetButtonText:l.string,onResetToDefault:l.func,style:l.object},x=({headerText:e=b,info:t=_,resetButtonText:r=h,onResetToDefault:o=(()=>{}),style:n={}})=>a.createElement(m,{style:n},a.createElement(v,{"data-test":"popover-header"},e),a.createElement(d.default,{"data-test":"customized-source-popover-message",type:"info"},t),a.createElement(p.default,{"data-test":"popover-reset",appearance:"secondary",onClick:o,label:r}));x.propTypes=g,t.default=x},7020:e=>{e.exports=require("@splunk/react-ui/Button")},9250:e=>{e.exports=require("@splunk/react-ui/ControlGroup")},6447:e=>{e.exports=require("@splunk/react-ui/Message")},1551:e=>{e.exports=require("@splunk/react-ui/Popover")},4566:e=>{e.exports=require("@splunk/themes/variables")},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 r=function r(o){var n=t[o];if(void 0!==n)return n.exports;var i=t[o]={exports:{}};return e[o].call(i.exports,i,i.exports,r),i.exports}(2468);module.exports=r})();
//# sourceMappingURL=CustomizedInSourceEditor.js.map