import React, { useState, useEffect } from "react"; import { invoke } from "@tauri-apps/api/core"; import { TextDisplay, SettingsGroup } from "../../ui"; interface DebugPathsProps { descriptionMode?: "tooltip" | "inline"; grouped?: boolean; } export const DebugPaths: React.FC = ({ descriptionMode = "inline", grouped = false, }) => { const [appDirPath, setAppDirPath] = useState(""); const [loading, setLoading] = useState(true); const [error, setError] = useState(null); useEffect(() => { const loadPaths = async () => { try { const result = await invoke("get_app_dir_path"); setAppDirPath(result); } catch (err) { setError(err instanceof Error ? err.message : "Failed to load paths"); } finally { setLoading(false); } }; loadPaths(); }, []); const handleCopy = (value: string) => { // Could add a toast notification here if desired console.log("Copied to clipboard:", value); }; if (loading) { return (
); } if (error) { return (

Error loading paths: {error}

); } return ( ); };