'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var React = require('react');
require('@emotion/core');
var _tslib = require('./_tslib-9c546438.js');
var jsxRuntime = require('@emotion/react/jsx-runtime');
require('@emotion/styled');
require('@emotion/react');
require('./css-203af057.js');
var autoId_esm = require('./auto-id.esm-3b4575a4.js');
var utilities = require('./utilities-d51a0c2d.js');
var TabProvider = require('./TabProvider.js');

function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

var React__default = /*#__PURE__*/_interopDefaultLegacy(React);

var TabPanel = function (_a) {
    var userProvidedId = _a.id, _b = _a.customCss, customCss = _b === void 0 ? '' : _b, children = _a.children, hidden = _a.hidden, tabId = _a.tabId, props = _tslib.__rest(_a, ["id", "customCss", "children", "hidden", "tabId"]);
    var id = autoId_esm.useId(userProvidedId);
    var resolvedCss = utilities.useCustomCss(customCss);
    var tabContext = React__default['default'].useContext(TabProvider.TabContext);
    return (jsxRuntime.jsx("div", _tslib.__assign({ className: "tab-panel", id: id, role: "tabpanel", "aria-labelledby": tabId, hidden: hidden || (tabContext !== null && tabId !== tabContext.activeTabId), css: resolvedCss }, props, { children: children }), void 0));
};

exports.TabPanel = TabPanel;
//# sourceMappingURL=TabPanel.js.map
