import React from 'react';
import PropTypes from 'prop-types';
import { Tabs } from 'antd';
import useSettings from '../vm-hooks/useSettings';
import './style';
const { TabPane } = Tabs;
const SubTabs = props => {
    const { theme } = useSettings();
    return (
        <Tabs {...props} className={`vtx-sub-tabs ${theme}`} type="card">
            {props.children}
        </Tabs>
    );
};

SubTabs.propTypes = {
    children: PropTypes.element,
};

export const SubTabPane = props => {
    const { children, ...ext } = props;
    return (
        <TabPane {...ext} className="tab-pane">
            {children}
        </TabPane>
    );
};

SubTabPane.propTypes = {
    children: PropTypes.element,
};

export default SubTabs;
