import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/objectWithoutProperties";import{useCallback as r,createElement as o}from"react";import{jsx as i}from"react/jsx-runtime";import{ToggleButtonGroup as a,ToggleButton as n}from"@material-ui/lab";import l from"classnames";import{Tooltip as s}from"../Tooltip/Tooltip.js";import c from"./ToggleButtons.scss.js";var m=["label","testId","className","tooltip","disabled","value","type"];function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function u(t){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?p(Object(o),!0).forEach((function(r){e(t,r,o[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):p(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var b={primary:c.primary,secondary:c.secondary},d={large:c.large,medium:c.medium,small:c.small},f=function(e){var r=e.label,o=e.testId,a=e.className,p=e.tooltip,d=e.disabled,f=e.value,y=e.type,v=t(e,m),O=i(n,u(u({disabled:d,"data-testid":o,className:l(c.button,b[y],a),value:f},v),{},{children:r}));return p?i(s,{title:p,children:O}):O},y=function(e){var t=e.testId,n=e.className,s=e.options,m=e.size,p=void 0===m?"medium":m,b=e.value,y=e.onChange,v=e.type,O=void 0===v?"primary":v,j=r((function(e,t){null!==t&&y&&y(t,e)}),[y]);return i(a,{className:l(c.root,d[p],n),"data-testid":t,onChange:j,value:b,exclusive:!0,size:p,children:s.map((function(e){return o(f,u(u({},e),{},{key:e.value,type:O}))}))})};export{y as ToggleButtons};
//# sourceMappingURL=ToggleButtons.js.map
