import { KeyboardEvent, PointerEvent } from 'react'; import { UiCoreLocale } from '../../../helpers/uiCoreLocale'; import { CardCheckbox, CardHeadingLevel, CardModel, CardOpen } from './Card.types'; export interface CardModelInput { open?: CardOpen; readOnly?: boolean; checkbox?: boolean; menu?: boolean; footerAction?: boolean; ctaAction?: boolean; } /** * The model follows what the card does (CARD-2): it opens nothing → static; it opens one thing and * holds any control → partially clickable; otherwise fully clickable. Select mode never changes it. * * @see asma-modules/_docs/ux/components/component-card.md:114 — §4 Interaction models */ export declare const resolveCardModel: (input: CardModelInput, bodyControlCount: number) => CardModel; /** * Whole calendar days since the due date, in local time; 0 on the due date or before it. * The card's overdue words ("Forfalt • N dager") are built by the app from this number (CARD-10). * * @see asma-modules/_docs/ux/components/component-card.md:169 — CARD-10 */ export declare const getOverdueDays: (dueDate: Date, today?: Date) => number; /** What a body control needs to name itself after its card (CARD-5). */ export interface CardContextValue { titleText: string; /** The label followed by the card's title in the card's locale, e.g. "Delt status, «Av-Grunndata»". */ composeName: (label: string) => string; registerControl: () => () => void; } export declare const CardContext: import('react').Context; /** Read the surrounding card's title and naming helper from inside its body. */ export declare const useCardContext: () => CardContextValue; /** Provided by `CardList` to every card in it (CARD-7, CARD-8, CARD-13). */ export interface CardListItemContextValue { headingLevel?: CardHeadingLevel; checkbox?: CardCheckbox; locale?: UiCoreLocale; } export declare const CardListItemContext: import('react').Context; interface PressedHoldHandlers { onPointerDown: (event: PointerEvent) => void; onPointerUp: () => void; onPointerLeave: () => void; onPointerCancel: () => void; onKeyDown: (event: KeyboardEvent) => void; onKeyUp: () => void; } /** * Keeps the card's pressed look for at least ~100 ms, so a fast tap still shows it; dragging off * the card cancels it. Only a press on the card's own link counts, never one on a control (CARD-15). * * @see asma-modules/_docs/ux/patterns/pattern-pressed-state.md:81 — Timing and motion */ export declare const usePressedHold: () => { isPressed: boolean; handlers: PressedHoldHandlers; }; export {};