import e from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/objectWithoutProperties";import t from"@babel/runtime/helpers/slicedToArray";import{jsx as o,jsxs as i,Fragment as n}from"react/jsx-runtime";import{useState as l,useCallback as s}from"react";import{findAppHeaderElement as a}from"../utils.js";import{Provider as c}from"./Provider/Provider.js";import{Toggle as p}from"./Toggle/Toggle.js";import{Popover as m}from"./Popover/Popover.js";import{ToggleDisplayDefault as f}from"./ToggleDisplayDefault/ToggleDisplayDefault.js";var d=["testId","className","disabled","toggleContent"];function b(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function g(r){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?b(Object(o),!0).forEach((function(t){e(r,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):b(Object(o)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))}))}return r}var u=function(e){var r=e.className,c=e.testId,f=e.disabled,d=e.toggleContent,b=l(),g=t(b,2),u=g[0],j=g[1],O=s((function(e){j(a(e))}),[]);return i(n,{children:[o(p,{className:r,testId:c,ref:O,disabled:f,children:d}),o(m,{anchorEl:u,disabled:f})]})},j=function(e){var t=e.testId,i=e.className,n=e.disabled,l=e.toggleContent,s=r(e,d);return o(c,g(g({},s),{},{children:o(u,{testId:t,className:i,disabled:n,toggleContent:l})}))};j.Provider=c,j.Toggle=p,j.Popover=m,j.ToggleDisplayDefault=f,j.GetHeaderElement=a;export{j as TemplatesControl};
//# sourceMappingURL=TemplatesControl.js.map
