import { ReactNode } from 'react'; import { MailingListDef, MailingListDraft, MailingListTargetConfig } from '../schema/index.ts'; /** * Host integration for mailing-list automations. `lists` is what the host's * backend exposes; `config` says where the add/remove goes and how it's encoded; * `createList` (optional) persists a list the author creates on the fly and * returns the finalized def. `enabled` needs a usable `config` plus at least one * list *or* a `createList` handler. Mirrors the custom fields provider: the * builder never invents endpoints, it just lets the author declare intent and * compiles it into a hidden submit target. */ export interface MailingListsApi { lists: MailingListDef[]; config?: MailingListTargetConfig; createList?: (draft: MailingListDraft) => Promise; enabled: boolean; } export declare function MailingListsProvider({ lists, config, createList, children, }: { lists?: MailingListDef[]; config?: MailingListTargetConfig; createList?: (draft: MailingListDraft) => Promise; children: ReactNode; }): import("react").JSX.Element; export declare function useMailingLists(): MailingListsApi;