import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Content, List, Root, Trigger } from "@radix-ui/react-tabs";
import React from "react";
export function Tabs({ children, defaultValue, }) {
    return (_jsxs(Root, { defaultValue: defaultValue, className: "flex flex-col gap-2", children: [_jsx("div", { className: "flex w-full justify-between", children: _jsx(List, { className: "flex w-full gap-x-2 rounded-xl bg-slate-50 p-1 text-sm font-semibold text-gray-600 outline-none", children: React.Children.map(children, (child, i) => {
                        if (!React.isValidElement(child))
                            return;
                        const { label, disabled } = child.props;
                        return (_jsx(Trigger, { className: "data-[state='active']:tab-shadow ata-disabled:cursor-not-allowed data-disabled:text-gray-400 flex h-7 flex-1 items-center justify-center rounded-lg transition duration-300 data-[state='active']:bg-gray-50 data-[state='active']:text-gray-900", value: label, disabled: disabled ?? false, children: label }, label));
                    }) }) }), _jsx("div", { className: "mt-3 rounded-md bg-white", children: React.Children.map(children, (child, i) => {
                    if (!React.isValidElement(child))
                        return;
                    const { label } = child.props;
                    return (_jsx(Content, { value: label, children: child }, i));
                }) })] }));
}
//# sourceMappingURL=tabs.js.map