import e from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/objectWithoutProperties";import{jsx as t,jsxs as i,Fragment as o}from"react/jsx-runtime";import{Tab as a,Tabs as n}from"@material-ui/core";import s from"classnames";import{forwardRef as l,useCallback as c}from"react";import{Tooltip as m}from"../Tooltip/Tooltip.js";import p from"./Tabs.scss.js";var u=["item","type","size"];function d(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,i)}return t}function f(r){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?d(Object(i),!0).forEach((function(t){e(r,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):d(Object(i)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(i,e))}))}return r}var b={medium:p.medium,small:p.small},y={primary:p.primary,secondary:p.secondary,tertiary:p.tertiary},v={horizontal:p.horizontal,vertical:p.vertical},O=l((function(e,n){var l=e.item,c=e.type,d=e.size,v=r(e,u),O=l.className,h=l.disabled,j=l.prefix,P=l.testId,g=l.label,z=l.value,w=l.tooltip;return t(m,{title:w,disabled:!w,children:t(a,f(f({},v),{},{label:i(o,{children:[j&&t("span",{className:p.prefix,children:j}),g]}),value:z,disabled:h,className:s(p.tab,y[c],b[d],O),"data-testid":P,ref:n}))})})),h=function(e){var r=e.testId,i=e.items,o=e.className,a=e.onChange,l=e.type,m=void 0===l?"primary":l,u=e.size,d=void 0===u?"medium":u,f=e.direction,b=void 0===f?"horizontal":f,y=e.value,h=c((function(e,r){return null==a?void 0:a(r)}),[a]);return t(n,{className:s(p.root,v[b],"primary"!==m&&p.noIndicator,o),onChange:h,"data-testid":r,scrollButtons:"off",value:y,indicatorColor:"primary",orientation:b,children:i.map((function(e){return t(O,{size:d,type:m,item:e,value:e.value},e.value)}))})};export{h as Tabs};
//# sourceMappingURL=Tabs.js.map
