import { ButtonMetadata } from '../../types'; /** * Optional status chip rendered as an eyebrow at the top-left of the card. * Rendered via `val-pill` (badge mode). */ export interface EntityCardChip { /** Already-resolved label string. */ label: string; /** Ionic color name (`primary`…`dark`) or CSS color. Default: `medium`. */ color?: string; } /** * Configuration for `val-entity-card`. * * Presentational molecule — every text field is an already-resolved string * (the consumer translates via `I18nService.t()`). No i18n of its own. * * Covers two real use-cases: * * 1. **Navigable entity** — set `clickable: true` (and no `actions`). The whole * card becomes a button: shows a chevron, gains `role="button"` + keyboard * support, and emits `(cardClick)` with `token`. * * 2. **Row with action(s)** — provide `actions` (e.g. a prize row with an * "edit"/"assign" button). Each button emits `(actionClick)` with its token. * When `actions` is present the card is NOT navigable (no chevron). * * @example Navigable event * ```html * * ``` * * @example Prize row with an action * ```html * * ``` */ export interface EntityCardMetadata { /** Optional status badge, top-left of the card. Rendered with `val-pill`. */ chip?: EntityCardChip; /** Main text (weight 700). Already resolved. */ title: string; /** Secondary muted line. Already resolved. */ subtitle?: string; /** Additional secondary note (e.g. "Ganador: X"), muted, below `subtitle`. */ endNote?: string; /** Action buttons rendered on the right (one `val-button` each). */ actions?: ButtonMetadata[]; /** * When `true`, action buttons are rendered in a row **below** the text block * instead of inline on the right. Useful when button labels are long and * horizontal space is tight (e.g. on mobile). */ actionsBelow?: boolean; /** * When `true` and there are NO `actions`, the whole card is navigable: * shows a chevron, `role="button"` + `tabindex`, keyboard activation, and * emits `(cardClick)`. */ clickable?: boolean; /** Identifier emitted on `(cardClick)`. */ token?: string; }