import * as React from 'react'; import { View } from 'react-native'; import type { ZestUIComponentProps, Orientation } from '../../types'; import { type ZestChangeEventDetails } from '../../utils/createChangeEventDetails'; import { REASONS } from '../../utils/reasons'; import type { TabsTab } from '../tab/TabsTab'; /** * Groups the tabs and the corresponding panels. * Renders a ``. */ export declare function TabsRoot(componentProps: TabsRoot.Props): React.JSX.Element; export type TabsRootOrientation = Orientation; export interface TabsRootState { /** * The component orientation (layout flow direction). */ orientation: TabsRoot.Orientation; /** * The direction of the active tab relative to the previously active one. */ tabActivationDirection: TabsTab.ActivationDirection; } export interface TabsRootProps extends Omit, 'value'> { /** * The value of the currently selected Tab. Use when the component is controlled. * When the value is `null`, no Tab will be selected. */ value?: TabsTab.Value | undefined; /** * The default value. Use when the component is not controlled. * When the value is `null`, no Tab will be selected. * @default 0 */ defaultValue?: TabsTab.Value | undefined; /** * The component orientation (layout flow direction). * @default 'horizontal' */ orientation?: TabsRoot.Orientation | undefined; /** * Callback invoked when a new value is being set. * * The event `reason` is `'none'` for user-initiated changes, such as a press; * `'initial'` for the first automatic selection or fallback in uncontrolled * roots when `defaultValue` is omitted or `undefined`, including when the * implicit initial value is disabled or missing; `'disabled'` for automatic * fallback when the selected tab becomes disabled in uncontrolled roots; or * `'missing'` for automatic fallback when the selected tab is removed, or when * an explicit `defaultValue` never matches a mounted tab in uncontrolled roots. * * For automatic changes, the selected value can be `null` when no enabled Tab * is available as a fallback. * * Automatic changes cannot be canceled; calling `eventDetails.cancel()` for * `'initial'`, `'disabled'`, or `'missing'` has no effect. */ onValueChange?: ((value: TabsTab.Value, eventDetails: TabsRoot.ChangeEventDetails) => void) | undefined; } export type TabsRootChangeEventReason = typeof REASONS.none | typeof REASONS.disabled | typeof REASONS.missing | typeof REASONS.initial; export type TabsRootChangeEventDetails = ZestChangeEventDetails; export declare namespace TabsRoot { type State = TabsRootState; type Props = TabsRootProps; type Orientation = TabsRootOrientation; type ChangeEventReason = TabsRootChangeEventReason; type ChangeEventDetails = TabsRootChangeEventDetails; } //# sourceMappingURL=TabsRoot.d.ts.map