import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
import * as __WEBPACK_EXTERNAL_MODULE__chakra_ui_react__ from "@chakra-ui/react";
const Tabs = ({ items, onChange, ...props })=>/*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__["default"].createElement(__WEBPACK_EXTERNAL_MODULE__chakra_ui_react__.Tabs, {
        ...props,
        size: "md",
        lazyBehavior: "unmount",
        onChange: (index)=>onChange?.(index, items.find((_item, itemIndex)=>index === itemIndex)?.key || ''),
        isLazy: true
    }, /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__["default"].createElement(__WEBPACK_EXTERNAL_MODULE__chakra_ui_react__.TabList, null, items.map((item)=>'string' == typeof item.isDisabled && '' !== item.isDisabled ? /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__["default"].createElement(__WEBPACK_EXTERNAL_MODULE__chakra_ui_react__.Tooltip, {
            label: item.isDisabled,
            placement: "bottom",
            hasArrow: true
        }, /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__["default"].createElement(__WEBPACK_EXTERNAL_MODULE__chakra_ui_react__.Tab, {
            key: item.key + '-tab',
            isDisabled: !!item.isDisabled || false
        }, item.name)) : /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__["default"].createElement(__WEBPACK_EXTERNAL_MODULE__chakra_ui_react__.Tab, {
            key: item.key + '-tab',
            isDisabled: !!item.isDisabled || false
        }, item.name))), /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__["default"].createElement(__WEBPACK_EXTERNAL_MODULE__chakra_ui_react__.TabPanels, null, items.map((item)=>/*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__["default"].createElement(__WEBPACK_EXTERNAL_MODULE__chakra_ui_react__.TabPanel, {
            key: item.key + '-content',
            px: 0
        }, item.component))));
/* ESM default export */ const Tabs_rslib_entry_ = Tabs;
export { Tabs_rslib_entry_ as default };
