import type { Editor } from "@tiptap/react"; import type { UseFormReturn } from "react-hook-form"; interface UseInboxButtonSyncOptions> { editor: Editor | null; form: UseFormReturn; buttonIndex: 0 | 1; labelField: keyof T & string; defaultLabel: string; } /** * Per-button label sync hook for the Inbox channel sidebar. * * Mirrors the Email channel's `useNodeAttributes` sync pattern but handles the * two node shapes that appear in Inbox: * - `buttonRow` (atom): 2 buttons merged into 1 node with button1Label/button2Label attrs * - `button` (inline-content): standalone button nodes with a `label` attr * * Editor → sidebar: subscribes to `editor.on("update")`, reads the label from the * correct node/attribute, calls `form.setValue` (same as `useNodeAttributes`). * * Sidebar → editor: returns `updateLabel(newLabel)` that immediately updates the * editor via `setNodeMarkup` (buttonRow) or `updateButtonLabelAndContent` (button). */ export declare function useInboxButtonSync>({ editor, form, buttonIndex, labelField, defaultLabel, }: UseInboxButtonSyncOptions): { updateLabel: (newLabel: string) => void; }; export {};