import { useMessages } from './useMessages';

export function useFields() {
  const { formatMessage, labels } = useMessages();

  const fields = [
    // { name: 'cohort', type: 'string', label: formatMessage(labels.cohort) },
    // { name: 'segment', type: 'string', label: formatMessage(labels.segment) },
    { name: 'url', type: 'string', label: formatMessage(labels.url) },
    { name: 'title', type: 'string', label: formatMessage(labels.pageTitle) },
    { name: 'referrer', type: 'string', label: formatMessage(labels.referrer) },
    { name: 'query', type: 'string', label: formatMessage(labels.query) },
    { name: 'browser', type: 'string', label: formatMessage(labels.browser) },
    { name: 'os', type: 'string', label: formatMessage(labels.os) },
    { name: 'device', type: 'string', label: formatMessage(labels.device) },
    { name: 'country', type: 'string', label: formatMessage(labels.country) },
    { name: 'region', type: 'string', label: formatMessage(labels.region) },
    { name: 'city', type: 'string', label: formatMessage(labels.city) },
    { name: 'host', type: 'string', label: formatMessage(labels.host) },
    { name: 'tag', type: 'string', label: formatMessage(labels.tag) },
  ];

  return { fields };
}

export default useFields;
