import { type ComponentType, type ReactNode } from "react"; import { type StyleProp, type ViewStyle } from "../../style/index.js"; import { type CardProps } from "../card/card.shared.js"; import { type ButtonProps } from "../../atoms/button/button.shared.js"; import { type SwitchProps } from "../../atoms/switch/switch.shared.js"; import { type ActionPanelSkin } from "./action-panels.styles.js"; export interface ActionPanelProps { /** The headline: what the action acts on. */ title?: string; /** The consequence copy beneath the title: what happens when the action fires. */ description?: string; /** The action button label. */ actionLabel?: string; /** Fired when the action button is pressed. */ onAction?: () => void; destructive?: boolean; inline?: boolean; toggle?: boolean; /** The Switch on/off state when `toggle` is set (CONTROLLED). Omit for uncontrolled use. */ checked?: boolean; /** Initial Switch state for uncontrolled use (the toggle flips itself on press). */ defaultChecked?: boolean; /** Fired with the next checked value when the toggle Switch is flipped. */ onToggle?: (next: boolean) => void; /** * Content embedded in the panel between the copy and the action (a block of * field rows in a settings panel, say). Stacked, it joins the panel's gap * column between the copy and the action; inline and in toggle mode the action * is pinned beside the copy, so it renders full width below that row. */ children?: ReactNode; /** E2E hook forwarded to the root element. */ testID?: string; /** Outer layout composition only (width/flex within a parent), never a restyle hook. */ style?: StyleProp; } export type CardComponent = ComponentType; export type ButtonComponent = ComponentType; export type SwitchComponent = ComponentType; /** * Build an ActionPanel component from a platform skin. * * `Card`, `Button`, and `Switch` are the platform-correct atoms, passed in by * each platform's thin `.tsx`/`.ios`/`.android` file, so the panel surface and * the action match the panel's platform on every build path. This matters for * the WEB docs 3-up preview: a bare barrel import always resolves the WEB atom in * a browser bundler, which would paint a web-styled Card/Button/Switch inside the * iOS/Android rows; each row must show that platform's surface and action. On a * real device Metro resolves the right atom by extension regardless, so the * default (the web base) is correct there too. All three default to the web base * when omitted. */ export declare function createActionPanel(skin: ActionPanelSkin, Button?: ButtonComponent, Switch?: SwitchComponent, Card?: CardComponent): (props: ActionPanelProps) => import("react").JSX.Element; //# sourceMappingURL=action-panels.shared.d.ts.map