import type { InjectionKey, Ref } from 'vue'; import type { QTableColumn } from 'quasar'; import type { Settings, Table } from '../stores/main/models'; import type { CellKind } from './useCellRendering'; export interface TableCellContext { settings: Ref; selectedTable: Ref; textColorClass: (val: string | undefined) => string; textColorStyle: (val: string | undefined) => Record; bgColorClass: (val: string | undefined) => string; bgColorStyle: (val: string | undefined) => Record; resolveCellKind: ( value: unknown, opts: { colName: string; allowHtml: boolean; } ) => CellKind; sanitizeCellHtml: (value: string) => string; onHtmlCellClick: (event: MouseEvent) => void; openImage: (path: string) => void; } export const TableCellContextKey: InjectionKey = Symbol('tableCellContext'); export type { QTableColumn };