import type { SlugifierFn } from '@byline/core'; export interface PathWidgetProps { disabled?: boolean; /** The collection's `useAsPath` source field name, when configured. */ useAsPath: string | undefined; /** Collection path, forwarded to the slugifier as context. */ collectionPath: string; /** Default content locale, forwarded to the slugifier as context. */ defaultLocale: string; /** * The locale currently being edited in the form. When this differs * from `defaultLocale` (i.e. the editor is editing a translation), * the widget renders read-only — phase 1 paths are default-locale * territory, and the lifecycle drops translation-locale path changes * with a warn. Locking the input prevents the warn path being hit * through the admin form and gives editors a clear cue. */ activeLocale: string; /** `'create'` shows the live derived preview as placeholder text. */ mode: 'create' | 'edit'; /** * Installation slugifier used to derive the live preview. Must match the * server-side `ServerConfig.slugifier` so the preview agrees with what is * persisted. Defaults to the built-in `slugify` when omitted — callers * that keep the default slugifier need not pass this. */ slugifier?: SlugifierFn; /** * When `true`, the `useAsPath` source field's value is not editable through * this form (e.g. it is an allocator-assigned `counter`, or an otherwise * read-only field). Its value is either server-assigned — and so not * reproducible client-side — or simply cannot change, which means the * source-derived live preview and the "Regenerate" affordance are * meaningless. When set, the widget suppresses both and just shows the * persisted path. Defaults to `false`. */ sourceLocked?: boolean; /** * When `true`, the collection declares its paths managed * (`CollectionAdminConfig.lockPath`): the input renders read-only in both * modes and the preview placeholder and "Regenerate" action are * suppressed. Independent of `sourceLocked`, which answers whether the * form can derive a preview at all. Defaults to `false`. */ lockPath?: boolean; } /** * System-managed `path` widget. * * Edits the path stored in `byline_document_paths` for the current * (document, locale) row. Displays the current persisted/overridden * value as an editable input. * In create mode, when the user hasn't supplied an override, the input * shows the live-derived preview (slugified `useAsPath` source field) as * a placeholder so the user sees what will be saved. The "Regenerate" * action explicitly writes the current live preview into the override * slot so the user can re-anchor a path against the source field after * editing the title. * * Stable override handles: `.byline-form-path`, `.byline-form-path-header`, * `.byline-form-path-regenerate`. */ export declare const PathWidget: ({ useAsPath, collectionPath, defaultLocale, activeLocale, mode, slugifier, sourceLocked, lockPath, disabled, }: PathWidgetProps) => import("react").JSX.Element;