import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Content, List, Root, Trigger } from "@radix-ui/react-tabs";
import { useCallback } from "react";
import { EditorActionButtons } from "@powerhousedao/design-system/connect";
import { useEditorContext } from "../context/editor-context.js";
import { OtherTab } from "./other-tab.js";
import { PortfolioTab } from "./portfolio-tab.js";
import { TransactionsTab } from "./transactions-tab.js";
export function RWATabs() {
    const tabs = ["Portfolio", "Transactions", "Other"];
    const { onSwitchboardLinkClick, onExport, onClose, onShowRevisionHistory, clearSelected, } = useEditorContext();
    const handleTabChange = useCallback(() => {
        clearSelected();
    }, [clearSelected]);
    return (_jsxs(Root, { defaultValue: "Portfolio", onValueChange: handleTabChange, children: [_jsxs("div", { className: "flex justify-between", children: [_jsx(List, { className: "flex gap-x-2 rounded-xl bg-slate-50 p-1 text-sm font-semibold text-gray-600 outline-none", children: tabs.map((tab) => (_jsx(Trigger, { className: "data-[state='active']:tab-shadow data-disabled:cursor-not-allowed data-disabled:text-gray-400 h-7 w-32 rounded-lg transition duration-300 data-[state='active']:bg-gray-50 data-[state='active']:text-gray-900", value: tab, children: tab }, tab))) }), _jsx(EditorActionButtons, { onClose: onClose, onExport: onExport, onShowRevisionHistory: onShowRevisionHistory, onSwitchboardLinkClick: onSwitchboardLinkClick })] }), _jsxs("div", { className: "mt-3 rounded-md bg-slate-50 p-8", children: [_jsx(Content, { value: "Portfolio", children: _jsx(PortfolioTab, {}) }), _jsx(Content, { value: "Transactions", children: _jsx(TransactionsTab, {}) }), _jsx(Content, { value: "Other", children: _jsx(OtherTab, {}) })] })] }));
}
//# sourceMappingURL=tabs.js.map