import { DataExporterOption } from "../../../lib/@types";
const DOC_MAX_WIDTH = 860;
export function getVisibleColumns(columns) {
  const visibleColumns = [];
  let totalWidth = 0;
  for (const column of columns) {
    totalWidth += column.width;
    if (totalWidth >= DOC_MAX_WIDTH) {
      break;
    }
    visibleColumns.push(column);
  }
  return visibleColumns;
}
export function getOptionKey(option) {
  return Object.keys(DataExporterOption)
    .find((key) => {
    return DataExporterOption[key] === option;
  });
}
