import { type StyleProp, type ViewStyle } from "../../style/index.js"; import { Button as WebButton } from "../../atoms/button/button.js"; import { type ActionSheetSkin } from "./action-sheet.styles.js"; /** A single action in the sheet. */ export interface ActionSheetAction { /** * Optional stable identity for this action, used as the React key for its row. * Supply it when the `actions` array can reorder or have items inserted/removed * so React keeps each row associated with its logical action; falls back to the * label when omitted. */ id?: string | number; /** The row label. */ label: string; /** Run when the row is selected (the sheet then closes). */ onPress: () => void; /** Render the label in the destructive red (for an irreversible action). */ destructive?: boolean; /** Dim the row and ignore presses. */ disabled?: boolean; } export interface ActionSheetProps { /** Controlled open state. Omit for uncontrolled (a `trigger` opens it). */ open?: boolean; /** Fired when the open state changes (trigger press, scrim tap, Cancel, an action, back/escape). */ onOpenChange?: (open: boolean) => void; /** * Label for an optional trigger button. When set, the sheet renders the button * and opens itself on press (uncontrolled). Omit when you drive `open` yourself. */ trigger?: string; /** * Optional header title * * (a left-aligned primary-label heading on iOS, a short * centered heading on web, left-aligned on Android). * * * (a left-aligned primary-label heading). * * * (a left-aligned heading). * */ title?: string; /** Optional header message under the title. */ message?: string; /** The action rows. Each runs its `onPress` then closes the sheet. */ actions: ActionSheetAction[]; /** The Cancel row label (default "Cancel"). */ cancelLabel?: string; /** * Show the open sheet as a non-modal specimen inside its parent, for a catalogue or a * showcase: the stack rests against the parent's bottom edge (the parent gives it its * height) over the dim, with no Modal, no rise, no focus trap and no close on Escape, * native back or a tap on the dim. Its rows still run their actions. Ignored with * `trigger`, which always opens a live sheet. */ embedded?: boolean; /** E2E hook forwarded to the root element. */ testID?: string; /** * Outer layout composition for the bottom-anchored stack, composed onto the stack * container; not a restyle hook. (The device's bottom safe-area inset is applied * automatically, so it clears the home indicator without a manual `paddingBottom`.) */ style?: StyleProp; } /** Build an ActionSheet component from a platform skin. */ /** * The components a ActionSheet draws with that look different per platform. The web * builds are the defaults; the iOS and Android entries pass their own, so the docs' * platform columns render them truthfully (a device resolves them by platform either way). */ export interface ActionSheetParts { Button?: typeof WebButton; } export declare function createActionSheet(skin: ActionSheetSkin, parts?: ActionSheetParts): (props: ActionSheetProps) => import("react").JSX.Element | null; //# sourceMappingURL=action-sheet.shared.d.ts.map