/**
* Base interface for components that support `data-testid` cascading.
*
* Root compound components should extend this interface in their props type.
* This ensures `data-testid` can be destructured and passed to `TestIdProvider`.
*/
export interface TestableProps {
'data-testid'?: string;
}
/**
* Provider that sets the base `data-testid` for compound component trees.
*
* Root components extract `data-testid` from props and wrap children
* with this provider. Sub-components call `useTestId('slot')` to derive
* their own `data-testid` automatically.
*
* @example
* ```tsx
* // Root component
*
* {children}
*
*
* // Sub-component
* const testId = useTestId('close') // "my-alert--close"
* ```
*/
export declare const TestIdProvider: import("react").Provider;
/**
* Returns a derived `data-testid` for a sub-component slot, or the
* cascade base itself when no slot is provided.
*
* - `useTestId('close')` → `"{base}--close"` (sub-component pattern)
* - `useTestId('close', consumerTestId)` → `consumerTestId` when defined,
* else the slot-derived value (consumer override pattern — keeps
* `'data-testid': testIdProp ?? contextTestId` to a single call)
* - `useTestId()` → `"{base}"` (transparent wrapper pattern — useful for
* compound roots that pass through their parent's cascade without
* adding their own slot segment)
*
* Returns `undefined` when no parent `TestIdProvider` exists or
* when no `data-testid` was passed to the root component,
* keeping the DOM clean.
*/
export declare function useTestId(slot?: string, override?: string): string | undefined;