import { ReactNode } from 'react';
export interface Column {
    header: string;
    accessor: string;
    sortable?: boolean;
    render?: (row: any) => ReactNode;
}
export interface FetchParams {
    page: number;
    pageSize: number;
    sortField: string | null;
    sortOrder: 'asc' | 'desc' | null;
    searchTerm: string;
}
export interface FetchResult {
    data: any[];
    total: number;
}
export interface EditorProps {
    row: any;
    value: any;
    onChange: (val: any) => void;
    onCommit: () => void;
    onCancel: () => void;
}
export interface EditableColumn {
    accessor: string;
    editor: (props: EditorProps) => ReactNode;
    /**
     * Menentukan apakah cell pada row tertentu bisa diedit.
     * Bisa berupa boolean (statis) atau function yang menerima row dan return boolean (dinamis).
     * Jika true atau function return true, cell tidak bisa diklik atau diedit.
     */
    disabled?: boolean | ((row: any) => boolean);
}
export interface TableProps {
    columns: Column[];
    fetchData: (params: FetchParams) => Promise<FetchResult>;
    initialPageSize?: number;
    pageSizeOptions?: number[];
    initialSortField?: string | null;
    initialSortOrder?: 'asc' | 'desc' | null;
    placeholderSearch?: string;
    searchPlaceholder?: string;
    buttonSearchLabel?: string;
    className?: string;
    /** jika true, tambahkan kolom checkbox di paling kiri */
    selectable?: boolean;
    /** callback dipanggil saat user pilih beberapa row */
    onSelectionChange?: (selectedRows: any[]) => void;
    /** konfigurasi kolom yang bisa diedit */
    editableColumns?: EditableColumn[];
    /** callback dipanggil saat user commit perubahan 1 row */
    onRowUpdate?: (updatedRow: any) => void;
    /** nama properti unik sebagai key row (default: "id") */
    rowKey?: string;
    showSearch?: boolean;
    /** apakah row bisa diklik */
    rowClickable?: boolean;
    /** callback dipanggil saat user klik row (tidak dipanggil jika ada button action di cell) */
    onRowClick?: (row: any) => void;
    /** apakah kolom terakhir (biasanya Actions) sticky saat scroll horizontal */
    lastColumnSticky?: boolean;
    /** Custom render function untuk sort indicator wrapper */
    renderSortIndicator?: (params: {
        column: Column;
        index: number;
        isSorted: boolean;
        sortOrder: 'asc' | 'desc' | null;
        handleSort: (order: 'asc' | 'desc') => void;
    }) => ReactNode;
    /** Custom empty state content (string atau ReactNode) */
    emptyState?: string | ReactNode;
}
export default function Table({ columns, fetchData, initialPageSize, pageSizeOptions, initialSortField, initialSortOrder, placeholderSearch, // Deprecated: use searchPlaceholder instead
searchPlaceholder, buttonSearchLabel, className, selectable, onSelectionChange, editableColumns, onRowUpdate, rowKey, showSearch, rowClickable, onRowClick, lastColumnSticky, renderSortIndicator, emptyState, }: TableProps): import("react/jsx-runtime").JSX.Element;
//# sourceMappingURL=Table.d.ts.map