import { ColumnDef } from '@tanstack/react-table';

type Labels = {
  orderAsc: string;
  orderDesc: string;
  filter: string;
  clearFilter: string;
};

interface Pagination {
  pageIndex: number;
  pageSize: number;
}

export interface UncontrolledTableProps {
  data: any;
  columns: ColumnDef<ColumnsTable>[];
  onClick: any;
  onMouseOver: any;
  onMouseOut: any;
  showTotalResults: boolean;
  showSettings: boolean;
  pagination?: Pagination;
  totalPages: number;
  showClearFields?: boolean;
  customTotalResults?: string;
  labels?: Labels;
  tableClassName?: string;
  stickyHeader?: boolean;
  stickyHeaderP?: number;
  customIcons?: React.ReactNode[];
  hideColumns?: string[];
  draggable?: boolean;
  onChangePage: (pagination: Pagination) => void;
  onClearFieldsClick?: () => void;
  onFilterClick?: (column: string) => void;
  onSortClick?: (column: string, direction: string) => void;
  onColumnVisibilityChange?: (columnId: string, isVisible: boolean) => void;
  onDragEnd?: (data: any[]) => void;
}

export interface ColumnsTable {
  header: string;
  accessorKey: string;
  type: string;
  enableColumnFilter: boolean;
  filterFn: string;
  nofilter?: boolean;
}
