import type { CollectionSlug, GlobalAdminOptions, GlobalConfig, Plugin } from 'payload'; import type { EditorAccessGuard, MessagesHooks, MessagesSchema, MessagesScopesConfig, TypedMessagesScopesConfig } from './types.ts'; export interface MessagesPluginConfig { /** Nested object defining message keys and ICU templates. */ schema: Schema; globalSlug?: string; globalGroup?: GlobalAdminOptions['group']; globalLabel?: string; uploadCollection?: CollectionSlug; /** * Colocate translation editing with Payload globals. Each entry maps a * top-level schema key to a global with the same slug, adding a Messages * tab or sidebar to that global's edit view. * * Accepts an array of slugs (defaults to `'tab'` position) or a record * mapping slugs to `'tab' | 'sidebar' | { position, existingFieldsTabLabel? }`. */ scopes?: TypedMessagesScopesConfig; /** * Access control for allowing to edit the messages. * * @default `({ user }) => user !== null` */ editorAccess?: EditorAccessGuard; /** * Collection hooks for the messages collection. Extends Payload's * collection hooks with an additional `afterUpdate` callback. */ hooks?: GlobalConfig['hooks']; } export type { MessagesScopesConfig, MessagesSchema, MessagesHooks, EditorAccessGuard, }; export { fetchMessages } from './exports/fetchMessages'; export declare const intlPlugin: ({ schema, globalSlug, globalGroup, globalLabel, scopes: scopesConfig, uploadCollection, hooks, editorAccess, }: MessagesPluginConfig) => Plugin; //# sourceMappingURL=index.d.ts.map