import type { ComponentType, ReactElement, SyntheticEvent } from 'react';
type BasicObject = {
    [key: string]: any;
};
export type EventType = {
    _raw: ({
        trunc: boolean;
    } & BasicObject) | string;
    splunk_server: string;
    index: string;
    _cd?: string;
    source?: string;
    sourcetype?: string;
    _time?: string;
    host?: string;
} & BasicObject;
export declare enum PageToggle {
    None = "none",
    Some = "some",
    All = "all"
}
export type FieldValueHighlightMapType = Record<string, string | number | (string | number)[]>;
export type DatasourceTagsType = Record<string, Record<string, string[]>>;
export type AllTagsMapType = Record<string, string[]>;
export type FeatureFlagsMapType = Record<string, boolean>;
export interface TableComponentProps {
    /** Events to be rendered */
    events: Array<EventType>;
    /** Fields to be rendered */
    fields?: Array<{
        name: string;
    }>;
    /** Format for displaying time values */
    timeFormat?: string;
    /** Current page number of events if paginated */
    pageNumber?: number;
    /** Function to generate the expansion for a given row */
    getExpansionRow: (event: EventType, key: string, index?: number, pageNumber?: number) => ReactElement;
    /** Whether we want to show row numbers or not */
    rowNumbers?: boolean;
    /** Whether we want to wrap text or not */
    wrapResults?: boolean;
    /** Customized fields to be displayed in FooterFields */
    footerFields?: string[];
    /** Map of fields and their respective values to highlight */
    fieldValueHighlightMap?: FieldValueHighlightMapType;
    /** Map of existing tags */
    allTagsMap?: AllTagsMapType;
    /**
     * Props to support event selection
     */
    selection?: {
        /**
         * Callback to execute when all events of a page are toggled
         */
        onTogglePage: (events: EventType[], pageNumber: number, status: PageToggle) => void;
        /**
         * Callback to execute when an event on a page is toggled
         */
        onToggleRow: (event: EventType, index: number, pageNumber: number) => void;
        /**
         * Overall toggle state of the page
         */
        pageToggle: PageToggle;
        /**
         * Selected rows (events) on the page
         */
        rows: Row[];
    };
    /** Callback when the user clicks on the row's time value */
    onTimeClicked?: (e: SyntheticEvent, { time }: {
        time: string;
    }) => void;
    /** Additional props for time field with onClick */
    timeFieldAdditionalProps?: Record<string, any>;
    /** Callback when the user clicks on the field value in the expanded row */
    onFieldValueClicked?: (e: SyntheticEvent, { field, value }: {
        field: string;
        value: string;
    }) => void;
    /** Callback when the user clicks on the tag value in the expanded row */
    onTagClicked?: (e: SyntheticEvent, { field, value }: {
        field: string;
        value: string;
    }) => void;
    /** Check if an attribute is a field */
    isField?: (name: string) => boolean;
    /** update all tags state */
    updateAllTags?: (tags: AllTagsMapType) => void;
}
export type FormattingOption = {
    key: string;
    label: string;
};
export type Row = {
    event: EventType;
    index: number;
    pageNumber: number;
};
export type TableStyleType = {
    key: string;
    label: string;
    component: ComponentType<TableComponentProps>;
    formattingOptions?: FormattingOption[];
};
export type EventActionComponent = ComponentType<{
    event: EventType;
    key?: number;
    rowIndex?: number;
    pageNumber?: number;
}>;
export type EventActionComponentWithFilters = {
    eventtypeValues: string[];
    fieldFilters: string[];
    eventActionComponent: EventActionComponent;
};
export type FieldActionComponent = ComponentType<{
    event: EventType;
    key?: number;
    rowIndex?: number;
    pageNumber?: number;
    field: string;
    value: string;
}>;
type FieldActionComponentWithFilters = {
    eventtypeValues: string[];
    fieldActionComponent: FieldActionComponent;
};
export type FieldActionsComponentsWithFilters = Record<string, FieldActionComponentWithFilters[]>;
export type FieldActionsComponents = Record<string, FieldActionComponent[]>;
export type PageLengthSelectorHandlerType = (event: React.MouseEvent<HTMLButtonElement | HTMLAnchorElement>, { value }: {
    value: number;
}) => void;
export type EventAction = {
    label: string;
    name: string;
};
export type EventActionHandler = (e: SyntheticEvent, { action }: {
    action: string;
}) => void;
export type EventSelection = {
    onTogglePage: (events: EventType[], pageNumber: number, status: PageToggle) => void;
    onToggleRow: (event: EventType, index: number, pageNumber: number) => void;
    rows: Row[];
    actions?: EventAction[];
    onActionClicked?: EventActionHandler;
};
export {};
