import type { BlokkliApp } from '#blokkli/editor/types/app'; import type { RenderedFieldListItem } from '#blokkli/editor/types/field'; import type { BlockPermission } from '#blokkli/editor/types/definitions'; import type { ToolError } from '../types/index.js'; type ValidationResult = { valid: true; } | { valid: false; error: string; }; /** * Validate that all blocks exist and return them. */ export declare function validateBlocksExist(app: BlokkliApp, uuids: string[]): { blocks: RenderedFieldListItem[]; } | { error: string; }; /** * Validate that all blocks are in the same field. * Returns the field key if valid. */ export declare function validateSameField(blocks: RenderedFieldListItem[]): { fieldKey: string; host: RenderedFieldListItem['host']; } | { error: string; }; /** * Validate that field cardinality allows adding N blocks. */ export declare function validateFieldCardinality(app: BlokkliApp, host: RenderedFieldListItem['host'], fieldKey: string, additionalCount: number): ValidationResult; /** * Validate that all bundles are allowed in the field. */ export declare function validateBundlesAllowed(app: BlokkliApp, host: RenderedFieldListItem['host'], bundles: string[]): ValidationResult; /** * Check that none of the given blocks are inside a restricted ancestor. * Returns a ToolError if any block has a restricted ancestor, or undefined if * all are unrestricted. */ export declare function requireNoRestrictedAncestor(app: BlokkliApp, uuids: string[]): ToolError | undefined; /** * Check that the user has a specific permission for all given bundles. * Returns a ToolError if any bundle is denied, or undefined if all are allowed. */ export declare function requireBundlePermission(app: BlokkliApp, bundles: string[], operation: BlockPermission): ToolError | undefined; export {};