import { Button, Card, CardContent, Sheet, SheetContent, SheetHeader, SheetTitle, Tabs, TabsContent, TabsList, TabsTrigger, } from "@marzneshin/components" import { FC, useState } from "react" import { useTranslation } from "react-i18next" import { NodeType, useNodesSettingsMutation } from ".." import { useNodesSettingsQuery } from "../services/settings.query"; import { LogContainer } from "../log"; import { NodesDetailTable } from "../tables/detail-table"; import Editor from '@monaco-editor/react'; import { useTheme } from "@marzneshin/features/theme-switch"; interface NodesSettingsDialogProps { onOpenChange: (state: boolean) => void open: boolean entity: NodeType | null } export const NodesSettingsDialog: FC = ({ onOpenChange, open, entity }) => { const { t } = useTranslation(); const { data } = useNodesSettingsQuery(entity); const [config, setConfig] = useState(data) const mutate = useNodesSettingsMutation(); const { theme } = useTheme() const handleConfigChange = (newConfig: string | undefined) => { if (newConfig) { try { const parsedConfig = JSON.parse(newConfig); setConfig(parsedConfig); } catch (error) { throw null; } } }; if (entity) { return ( {t('page.nodes.settings.title')}

{t('page.nodes.settings.detail')}

{t('logs')} {t('config')}
) } }