import { StringUtils } from "@sankhyalabs/core";
import initI18n from "../../../../../../utils/i18n";
const columnsState = [{
    colId: StringUtils.generateUUID(),
  }];
const colDef = {
  headerName: 'name',
  checkboxSelection: false,
};
export const gridEditionImplementation = {
  getComponents: () => ({}),
  configureGrid: (option) => (Object.assign(Object.assign({}, option), { api: {
      setHeaderHeight: () => { },
      forEachNode: () => { },
    }, context: {}, columnApi: {
      moveColumn: () => { },
      setColumnWidth: () => { },
      setColumnsVisible: () => { },
      applyColumnState: () => { },
      getColumns: () => ([]),
      getColumn: () => ({
        getActualWidth: () => 30,
        getColDef: () => colDef,
      }),
      getColumnState: () => columnsState,
    } }))
};
export async function buildOptions(dataUnit) {
  return ({
    allowMultipleSelection: true,
    dataUnit,
    onColumnStateChange: () => { },
    onDoubleClick: () => { },
    onPaginationChange: () => { },
    onPaginationUpdate: () => { },
    onSelectionChange: () => { },
    serverURL: '',
    statusResolver: {},
    useEnterLikeTab: true,
    enableContinuousInsert: false,
    enableGridInsert: false,
    i18n: await initI18n(),
  });
}
