import * as React from 'react'; import { GridContext } from './Grid'; import { IButtonOptions } from '@singularsystems/neo-core/dist/Components/ButtonOptions'; import ComponentBase from '../ComponentBase'; import { INeoCommonColumnProps } from './ColumnHelper'; interface IDeleteButtonOptions extends IButtonOptions { /** * Callback to run when a non new item is deleted. * * Use this to call an api to delete the item in the database. * * Return true if the item was deleted, and must be removed from the list. * * The list will not be marked dirty. * * If the item is new, it will be removed without invoking this callback. */ onDeleteExisting?: (item: any) => Promise; } export interface IButtonColumnProps extends INeoCommonColumnProps { /** Item to pass to edit and delete callbacks. Defaults to the current rows item */ item?: any; /** Text to show in the header. */ label?: string; /** Show text on built in buttons (view / edit / delete). By default text is suppressed. */ showDefaultButtonText?: boolean; /** Size of edit and delete button */ buttonSize?: ("sm" | "lg"); /** Show delete button? Not required if deleteButton options are set. */ showDelete?: boolean; /** Delete button options. Will cause delete button to be shown. */ deleteButton?: IDeleteButtonOptions; /** Edit button options. Will cause edit button to be shown. */ editButton?: IButtonOptions; /** View button options. Will cause view button to be shown. */ viewButton?: IButtonOptions; /** Where should extra content be placed relative to the pre-defined buttons? */ childAlignment?: "left" | "right"; children?: React.ReactNode | (() => React.ReactNode); } type TableCellProps = Omit, "children">; export declare class ButtonColumn extends ComponentBase { static isColumnComponent: boolean; static contextType: React.Context>; context: React.ContextType; constructor(props: IButtonColumnProps & TableCellProps); private item; private section; protected onFirstRender(): void; private get itemAsModel(); onDelete(): Promise; render(): React.JSX.Element | null; private renderHeader; private renderBody; private renderFooter; } export {};