"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),r=require("@babel/runtime/helpers/objectWithoutProperties"),t=require("react/jsx-runtime"),i=require("@material-ui/core"),a=require("classnames"),o=require("react"),n=require("../Tooltip/Tooltip.js"),s=require("./Tabs.scss.js");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=l(e),c=l(r),d=l(a),p=["item","type","size"];function f(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 b(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?f(Object(t),!0).forEach((function(r){u.default(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):f(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var m={medium:s.medium,small:s.small},y={primary:s.primary,secondary:s.secondary,tertiary:s.tertiary},j={horizontal:s.horizontal,vertical:s.vertical},v=o.forwardRef((function(e,r){var a=e.item,o=e.type,l=e.size,u=c.default(e,p),f=a.className,j=a.disabled,v=a.prefix,O=a.testId,h=a.label,x=a.value,P=a.tooltip;return t.jsx(n.Tooltip,{title:P,disabled:!P,children:t.jsx(i.Tab,b(b({},u),{},{label:t.jsxs(t.Fragment,{children:[v&&t.jsx("span",{className:s.prefix,children:v}),h]}),value:x,disabled:j,className:d.default(s.tab,y[o],m[l],f),"data-testid":O,ref:r}))})}));exports.Tabs=function(e){var r=e.testId,a=e.items,n=e.className,l=e.onChange,u=e.type,c=void 0===u?"primary":u,p=e.size,f=void 0===p?"medium":p,b=e.direction,m=void 0===b?"horizontal":b,y=e.value,O=o.useCallback((function(e,r){return null==l?void 0:l(r)}),[l]);return t.jsx(i.Tabs,{className:d.default(s.root,j[m],"primary"!==c&&s.noIndicator,n),onChange:O,"data-testid":r,scrollButtons:"off",value:y,indicatorColor:"primary",orientation:m,children:a.map((function(e){return t.jsx(v,{size:f,type:c,item:e,value:e.value},e.value)}))})};
//# sourceMappingURL=Tabs.js.map
