import type { Access, Block, CollectionConfig, CollectionSlug, Field, Plugin, StaticLabel } from "payload"; /** * Generates component path for Payload admin components. * * For npm packages: 'package-name/client#ComponentName' * For local dev: 'basePath/componentPath#ComponentName' * * @param packageName - npm package name or local path (e.g. '@focusreactive/payload-plugin-presets' or '@/plugins/presetsPlugin') * @param componentPath - relative path within plugin (e.g. 'components/PresetAdminComponentPreview') * @param componentName - exported component name */ export declare function getPluginComponentPath(packageName: string | undefined, componentPath: string, componentName: string, entry?: "client" | "rsc"): string; /** Client-side config stored in admin.custom.presetsPlugin */ export interface PresetsPluginClientConfig { slug: CollectionSlug; presetTypes: string[]; /** Keys to exclude at all nesting levels (id, blockType, etc.) */ excludeKeys: string[]; /** Media collection slug for preview images (default: 'media') */ mediaCollection: string; } export interface PresetType { /** Block slug to target — must match block.slug exactly */ slug: string; /** Optional — falls back to block.labels.singular or slug */ label?: StaticLabel; /** Optional — falls back to block.fields */ fields?: Field[]; } export interface PresetsPluginConfig { slug?: string; labels?: CollectionConfig["labels"]; enabled?: boolean; /** * Override package name for component resolution. * Defaults to '@focusreactive/payload-plugin-presets'. * Set to a local path (e.g. '@/plugins/presetsPlugin') for local dev without npm. */ packageName?: string; /** Media collection slug for preview images (default: 'media') */ mediaCollection?: string; /** Override list — optional, defaults to [] */ presetTypes?: PresetType[]; /** Collection overrides */ overrides?: { /** Access control */ access?: { create?: Access; read?: Access; update?: Access; delete?: Access; }; /** Modify fields - receives default fields, return final fields */ fields?: (defaultFields: Field[]) => Field[]; /** All collection hooks */ hooks?: CollectionConfig["hooks"]; /** Admin config overrides */ admin?: Partial; }; } export declare function getBlockAdminComponents(block: Block, packageName?: string, userLabels?: unknown[]): NonNullable["components"]; export declare const presetsPlugin: (config?: PresetsPluginConfig) => Plugin;