import{__exports as t}from"../../../_virtual/TabContent.js";import e from"react";import{p as r}from"../../prop-types/index.js";import{c as o}from"../../classnames/index.js";import"./TabContext.js";import"./utils.js";import{__exports as n}from"../../../_virtual/utils.js";import{__exports as a}from"../../../_virtual/TabContext.js";!function(t){function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var u=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==i(t)&&"function"!=typeof t)return{default:t};var r=y(e);if(r&&r.has(t))return r.get(t);var o={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&Object.prototype.hasOwnProperty.call(t,a)){var u=n?Object.getOwnPropertyDescriptor(t,a):null;u&&(u.get||u.set)?Object.defineProperty(o,a,u):o[a]=t[a]}o.default=t,r&&r.set(t,o);return o}(e),c=p(r),f=p(o),s=a,l=n;function p(t){return t&&t.__esModule?t:{default:t}}function y(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(y=function(t){return t?r:e})(t)}function b(){return b=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},b.apply(this,arguments)}function d(t,e){for(var r=0;r<e.length;r++){var o=e[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function v(t,e){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},v(t,e)}function m(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,o=j(t);if(e){var n=j(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return function(t,e){if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function j(t){return j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},j(t)}var O={tag:l.tagPropType,activeTab:c.default.any,className:c.default.string,cssModule:c.default.object},h=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&v(t,e)}(a,t);var e,r,o,n=m(a);function a(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(e=n.call(this,t)).state={activeTab:e.props.activeTab},e}return e=a,o=[{key:"getDerivedStateFromProps",value:function(t,e){return e.activeTab!==t.activeTab?{activeTab:t.activeTab}:null}}],(r=[{key:"render",value:function(){var t=this.props,e=t.className,r=t.cssModule,o=t.tag,n=(0,l.omit)(this.props,Object.keys(O)),a=(0,l.mapToCssModules)((0,f.default)("tab-content",e),r);return u.default.createElement(s.TabContext.Provider,{value:{activeTabId:this.state.activeTab}},u.default.createElement(o,b({},n,{className:a})))}}])&&d(e.prototype,r),o&&d(e,o),Object.defineProperty(e,"prototype",{writable:!1}),a}(u.Component),_=h;t.default=_,h.propTypes=O,h.defaultProps={tag:"div"}}(t);
//# sourceMappingURL=TabContent.js.map
