import style from "./index.module.css";
import usePass from "@/hooks/usePass";
import UserResourcesEnvironment from "./UserResourcesEnvironment";
import { useMemo, useState } from "react";
import classNames from "classnames";
import Tabs from "@/components/mui/MyTabs";
import WorkflowOperator from "./WorkflowOperator";
import OperatorDetails from "./WorkflowOperator/components/OperatorDetails";
const UserResources = () => {
	const isPass = usePass();
	const tabList = useMemo(() => {
		return [
			{
				label: "工作流模版",
				value: "USERRESOURCES_TEMPLATE",
				component: <div />,
				hide: !isPass("USERRESOURCES_TEMPLATE"),
			},
			{
				label: "工作流算子",
				value: "USERRESOURCES_FLOE",
				component: <WorkflowOperator />,
				hide: !isPass("USERRESOURCES_FLOE"),
			},
			{
				label: "应用环境",
				value: "USERRESOURCES_ENVIRONMENT",
				component: <UserResourcesEnvironment />,
				hide: !isPass("USERRESOURCES_ENVIRONMENT"),
			},
		];
	}, [isPass]);

	return (
		<div className={style.userResources}>
			<Tabs
				title="个人资源"
				tabList={tabList}
				defaultValue={"USERRESOURCES_ENVIRONMENT"}
				tabPanelSx={{ padding: "0" }}
			/>
			{/* <OperatorDetails /> */}
		</div>
	);
};

export default UserResources;
