import type { ProjectScript, ResolvedKeybindingsConfig } from "@t3tools/contracts"; import { SettingsIcon } from "lucide-react"; import { shortcutLabelForCommand } from "../../keybindings"; import { commandForProjectScript } from "../../projectScripts"; import { ScriptIcon } from "../projectScriptEditor"; import { Button } from "../ui/button"; import { SettingsRow } from "./settingsLayout"; export function ProjectActionsList({ scripts, keybindings, disabled, onEdit, }: { scripts: readonly ProjectScript[]; keybindings: ResolvedKeybindingsConfig; disabled: boolean; onEdit: (script: ProjectScript) => void; }) { if (scripts.length === 0) return (

No actions configured.

); return scripts.map((script) => { const shortcutLabel = shortcutLabelForCommand(keybindings, commandForProjectScript(script.id)); return ( {script.name} {script.runOnWorktreeCreate ? ( setup ) : null} {script.previewUrl ? ( preview ยท desktop only ) : null} } description={{script.command}} control={ <> {shortcutLabel ? ( {shortcutLabel} ) : null} } /> ); }); }