import React from "react";
import * as Tabs from "@radix-ui/react-tabs";
import { RootElementContext } from "./context";
export const Root = ({ defaultValue, onChange, children }) => {
    const handleOnChange = (value) => {
        if (onChange) {
            onChange(value);
        }
    };
    return (React.createElement(RootElementContext.Provider, { value: {
            defaultValue,
            onChange,
            children,
        } },
        React.createElement(Tabs.Root, { defaultValue: defaultValue, onValueChange: handleOnChange }, children)));
};
// Export children
export { Tab } from "./Tab";
export { Content } from "./Content";
export { List } from "./List";
//# sourceMappingURL=index.js.map