import type { ActionButtonProps } from "@follow/components/ui/button/index.js" import { ActionButton } from "@follow/components/ui/button/index.js" import { useCommand } from "./hooks/use-command" import type { FollowCommand, FollowCommandId, FollowCommandMap } from "./types" interface CommandButtonProps extends ActionButtonProps { command: T args: Parameters shortcut?: string } export interface CommandIdButtonProps extends ActionButtonProps { commandId: T args: Parameters shortcut?: string } /** * @deprecated */ export const CommandActionButton = ({ command, args, shortcut, ...props }: CommandButtonProps) => { return ( command.run(...args)} {...props} /> ) } /** * @deprecated */ export const CommandIdButton = ({ commandId, ...props }: CommandIdButtonProps) => { const cmd = useCommand(commandId) if (!cmd) return return }