import dayjs from 'dayjs';
export var useColumns = function useColumns(locales) {
  return [{
    title: locales.getText('pisell2.text.ecocup.customer.list.customer'),
    dataIndex: 'display_name',
    key: 'display_name',
    align: 'center',
    width: 240
  }, {
    title: locales.getText('pisell2.text.ecocup.customer.list.registed'),
    dataIndex: 'create_time',
    key: 'create_time',
    align: 'center',
    width: 200,
    render: function render(text) {
      if (!text) return '';
      return dayjs(text).format('h:mma D MMM YYYY');
    }
  }, {
    title: locales.getText('pisell2.text.ecocup.customer.list.mobile'),
    dataIndex: 'phone',
    key: 'phone',
    align: 'center',
    width: 250
  }, {
    title: locales.getText('pisell2.text.ecocup.customer.list.email'),
    dataIndex: 'email',
    key: 'email',
    align: 'center',
    width: 250
  }, {
    title: locales.getText('pisell2.text.ecocup.customer.list.cup.borrowed'),
    dataIndex: 'total_rent_count',
    key: 'total_rent_count',
    align: 'center',
    width: 160
  }, {
    title: locales.getText('pisell2.text.ecocup.customer.list.cup.returned'),
    dataIndex: 'total_return_count',
    key: 'total_return_count',
    align: 'center',
    width: 160
  }];
};