"use client"; import { IconCpu } from "@tabler/icons-react"; import { useAppStore } from "@/components/state-provider"; import { getExecutorIcon } from "@/lib/executor-icons"; import { SettingsGroup, SettingsLeaf } from "./settings-nav-primitives"; const ROOT_HREF = "/settings/executors"; type ExecutorsGroupProps = { pathname: string; expanded?: boolean; onToggle?: () => void; }; export function ExecutorsGroup({ pathname, expanded, onToggle }: ExecutorsGroupProps) { const executors = useAppStore((s) => s.executors.items); const allProfiles = executors.flatMap((executor) => (executor.profiles ?? []).map((profile) => ({ ...profile, executorType: executor.type })), ); return ( {allProfiles.map((profile) => { const Icon = getExecutorIcon(profile.executorType); const profilePath = `${ROOT_HREF}/${profile.id}`; return ( ); })} ); }