hunk.code_window: import _ from 'lodash';
   import { Environment } from '@/portainer/environments/types';
   import type { DockerContainer } from '@/react/docker/containers/types';
   import { TableSettingsMenu, Datatable } from '@@/datatables';
   import {
  
hunk.labels: keep keep keep add keep keep keep
hunk.after_edit: import { useShowGPUsColumn } from '@/react/docker/containers/utils';
  
hunk.file_path: app/react/docker/containers/ListView/ContainersDatatable/ContainersDatatable.tsx
hunk.type: add
file: import _ from 'lodash';
  import { useMemo } from 'react';
  
  import { created } from './created';
  import { host } from './host';
  import { image } from './image';
  import { ip } from './ip';
  import { name } from './name';
  import { ownership } from './ownership';
  import { ports } from './ports';
  import { quickActions } from './quick-actions';
  import { stack } from './stack';
  import { state } from './state';
  import { gpus } from './gpus';
  
  export function useColumns(isHostColumnVisible: boolean) {
    return useMemo(
      () =>
        _.compact([
          name,
          state,
          quickActions,
          stack,
          image,
          created,
          ip,
          isHostColumnVisible && host,
          gpus,
          ports,
          ownership,
        ]),
      [isHostColumnVisible]
    );
  }
  