import { CourierButtonProps } from '../components/courier-button'; /** * The styling an Elemental `action` element can carry. * * Declared structurally rather than imported from `@trycourier/courier-js` so the core kit * stays free of a dependency on the data SDK. `InboxAction` satisfies it. */ export interface CourierActionStyle { background_color?: string; border_radius?: string; border_size?: string; font_size?: string; padding?: string; style?: string; color?: string; border?: { enabled?: boolean; color?: string; radius?: string | number; size?: string; }; } /** * The theme values that describe one action look. * * @public */ export interface CourierActionVariantThemeStyle { backgroundColor?: string; hoverBackgroundColor?: string; activeBackgroundColor?: string; border?: string; borderRadius?: string; shadow?: string; textDecoration?: string; padding?: string; font?: { family?: string; size?: string; weight?: string; color?: string; }; } /** * The theme values an integrator can set for a row of message actions. * * The top level applies to every action. Below it sits one block per `action.style`, each named * for the value it answers to — a theme reads the same as the template that feeds it, with no * mapping to remember between what a template sends and what a theme calls it. A block layers * over the top level, and an action's own Elemental styling still supersedes both. * * @public */ export interface CourierActionThemeStyle extends CourierActionVariantThemeStyle { /** Applies to `style: 'button'` — the filled button, and the default when a style is absent. */ button?: CourierActionVariantThemeStyle; /** Applies to `style: 'secondary'` — the outlined button. */ secondary?: CourierActionVariantThemeStyle; /** Applies to `style: 'tertiary'` — the borderless button. */ tertiary?: CourierActionVariantThemeStyle; /** Applies to `style: 'link'` — inline text rather than a button. */ link?: CourierActionVariantThemeStyle; } /** * Pick light or dark text for a background color, whichever stays readable on it. * * Elemental has no text color on actions, so a template that sets a dark fill would otherwise * render dark-on-dark. Only hex is understood; anything else returns `undefined` so the caller * falls back to the theme. */ export declare function readableTextColor(backgroundColor?: string): string | undefined; /** * Resolve the button styling for a message action. * * Precedence is the usual one: a value the integrator set on the theme wins; failing that the * action's own Elemental styling applies, so an untouched theme renders what the template author * configured; failing both, the value is left unset and `CourierButton` supplies its default. * * That ordering is what makes a theme an override rather than a suggestion — set * `actions.backgroundColor` and every action wears it, whatever colour the template asked for. * It also means the default theme deliberately says nothing about actions: a default living * there would outrank the template and there would be no way to tell it apart from a value the * integrator chose. */ export declare function courierActionButtonProps(action: CourierActionStyle, theme?: CourierActionThemeStyle): Partial;