import type { SelectionBehavior } from "@applicaster/zapp-react-native-utils/modalState"; import { selectableCell } from "./selectableCell"; import { standardCell } from "./standardCell"; import type { CellRenderer } from "./types"; export type { CellRenderer, RenderItemArgs, SheetRenderContext } from "./types"; export { standardCell } from "./standardCell"; export { selectableCell } from "./selectableCell"; import { dynamicCollectionCell } from "./dynamicCollectionCell"; const SELECTION_ROLES = new Set(["collection_selector", "preference_editor"]); /** * Resolve the row cell from feed role (+ behavior for future config only). * Unknown / none -> standard Button cell. */ export const getCell = ( role?: string, _behavior?: SelectionBehavior ): CellRenderer => { if (role === "dynamic_collection") return dynamicCollectionCell; return role && SELECTION_ROLES.has(role) ? selectableCell : standardCell; };