/** * Row expansion module for IOI Table. * Handles row expand/collapse operations. */ import type { ComputedRef, Ref } from 'vue'; import type { IoiRowExpandPayload, IoiSemanticEvent, IoiSemanticEventType, IoiTableState } from '../../types'; /** * Row expansion API returned to the composable. */ export interface ExpansionApi { toggleRowExpansion: (key: string | number) => void; expandAllRows: () => void; collapseAllRows: () => void; isRowExpanded: (key: string | number) => boolean; } /** * Options for row expansion module. */ export interface ExpansionOptions { expandable: ComputedRef; rowExpandable?: (row: TRow, index: number) => boolean; onRowExpand?: (payload: IoiRowExpandPayload) => void; } /** * Dependencies for row expansion. */ export interface ExpansionDeps { state: Ref; rows: Ref; sortedIndices: ComputedRef; resolveRowKey: (row: TRow, index: number) => string | number | null; } /** * Event emitter function type. */ type EventEmitter = (type: IoiSemanticEventType, payload: TPayload) => IoiSemanticEvent; /** * Creates row expansion management functions. */ export declare function createExpansion(deps: ExpansionDeps, options: ExpansionOptions, emitEvent: EventEmitter): ExpansionApi; export {};