import type { LiteralElement, MessageFormatElement, PoundElement } from '@formatjs/icu-messageformat-parser'; import type { CollectionConfig, GlobalSlug, PayloadRequest } from 'payload'; import type { DeepPartial } from 'react-hook-form'; import type { MessagesPluginConfig } from '.'; export type ResolvedPluginOptions = keyof MessagesPluginConfig> = Pick>, K>; export type MessagesHooks = { afterUpdate?: () => Promise | void; } & CollectionConfig['hooks']; export interface TabScopeConfig { position: 'tab'; existingFieldsTabLabel?: string; } export interface SidebarScopeConfig { position: 'sidebar'; } export type ScopeConfig = TabScopeConfig | SidebarScopeConfig; export type ScopePosition = ScopeConfig['position']; export type ScopeKey = { [K in keyof Schema & GlobalSlug]: Schema[K] extends object ? K : never; }[keyof Schema & GlobalSlug]; export type MessagesScopesConfig = Scope[] | Record; export type TypedMessagesScopesConfig = MessagesScopesConfig>; export type EditorAccessGuard = (req: Pick) => boolean; export type Locale = string; export type Translations = Record; export type Messages = { [key: string]: Messages | string; }; export type MessagesSchema = Messages; export type MessageConfig = { description: string | undefined; variables: TemplateVariable[]; }; export interface VariableMentionNodeAttrs { name: string; label: string; icu: string; } export type { DeepPartial }; export type TemplateVariable = Exclude; export type { ArgumentElement, DateElement, LiteralElement, NumberElement, PluralElement, SelectElement, TagElement, TimeElement, } from '@formatjs/icu-messageformat-parser'; //# sourceMappingURL=types.d.ts.map