import React from 'react';
import { TableRowSelection } from 'antd/lib/table/interface';

export type TCTAction = {
  e: React.MouseEvent<HTMLElement, MouseEvent>;
  action: string;
  id: number;
};
export type TCTDeviceAction = {
  action: string;
  id: number;
  type?: string;
  files?: any;
  e?: React.MouseEvent<HTMLElement, MouseEvent>;
};
export type TypeLeftSidebar = {
  title: string;
  path?: string;
  icon?: JSX.Element;
  key: number;
  editGroup?: boolean;
  subMenu?: TypeLeftSidebar[];
  disabled?: boolean;
};

export type TypeDashboardPaginationState = {
  current: number;
  pageSize: number;
  total: number;
};

export type Props = {
  title?: string;
  cards: any;
  columns: any;
  setSelectedTag?: (id: number | undefined | null) => void;
  setSelectedInfoCard?: (id: number | undefined | null) => void;
  actionsWithSelectedCards?: JSX.Element[] | JSX.Element;
  leftSideBarContent?: TypeLeftSidebar[];
  filters: React.ReactNode;
  actionsWithCards?: Array<JSX.Element | null> | null;
  cardInfoComponent?: React.ReactNode;
  isGroupSidebar?: boolean;
  isUploadButton?: boolean;
  onRowEvent: any;
  loading: any;
  onSearch: any;
  pagination?: any;
  handleTagAction?: any;
  rowSelection?: {
    selectedRowKeys: number[];
    onSetSelectedRowItem: (ids: number[]) => void;
  } | null;
  changeRowCount?: any;
  hasSelected?: any;
  pageState: any;
  tagDrawer?: React.ReactNode;
  addRecordAction?: any;
  addNewEntity?: { entity: JSX.Element };
  osDrawer?: React.ReactNode;
  setCheckedColumns?: any;
  getCheckedColumns?: any;
  nameTable?: any;
  dashboardState?: TypeDashboardPaginationState;
  setSorterField?:
    | React.Dispatch<React.SetStateAction<string>>
    | ((newValue: string) => void);
  setDisabledForm?: (item: boolean) => void;
  getRowId?: (record: any) => number | string;
  getCheckboxProps?: TableRowSelection<any>['getCheckboxProps'];
};
