import {ColumnConfig} from '@common/datatable/column-config'; import {Trans} from '@common/i18n/trans'; import {FormattedDate} from '@common/i18n/formatted-date'; import {Link} from 'react-router-dom'; import {IconButton} from '@common/ui/buttons/icon-button'; import {EditIcon} from '@common/icons/material/Edit'; import React from 'react'; import {Channel} from '@common/channels/channel'; export const ChannelsDatatableColumns: ColumnConfig[] = [ { key: 'name', allowsSorting: true, width: 'flex-3', visibleInMode: 'all', header: () => , body: channel => { // link will not work without specific genre name in channel url if ( channel.config.restriction && channel.config.restrictionModelId === 'urlParam' ) { return channel.name; } return ( {channel.name} ); }, }, { key: 'content_type', allowsSorting: false, header: () => , body: channel => ( {channel.config.contentModel ? ( ) : undefined} ), }, { key: 'layout', allowsSorting: false, header: () => , body: channel => ( {channel.config.layout ? ( ) : undefined} ), }, { key: 'auto_update', allowsSorting: false, header: () => , body: channel => ( {channel.config.autoUpdateMethod} ), }, { key: 'updated_at', allowsSorting: true, maxWidth: 'max-w-100', header: () => , body: channel => channel.updated_at ? : '', }, { key: 'actions', header: () => , hideHeader: true, visibleInMode: 'all', align: 'end', width: 'w-42 flex-shrink-0', body: channel => ( ), }, ];