/**
 * These options define what we hide, or shorten, depending on
 * a leaderboard's given format, or its container's size.
 * We also adjust the leaderboard's text size based on its container size
 * but this is done via scss, and each component that needs to do so
 * should refer to the size prop returned by the leaderboard's context.
 */

/**
 * Our default options are to show everything, in its longest format
 * @property {string}  contestNameFormat       - The format passed to the `ContestName` component
 * @property {boolean} showContestDescription  - Whether to show a contest's description
 * @property {boolean} contestTypeFormat       - The format passed to the `ContestType` component
*/
const defaultOptions = {
  contestNameFormat: 'long',
  showContestDescription: true,
  contestTypeFormat: 'full'
};

/**
 * Our standard format follows our defaults, but our
 * condensed format overrides certain variables
 */
const optionsByFormat = {
  standard: {
    ...defaultOptions
  },
  condensed: {
    ...defaultOptions,
    showContestDescription: false
  }
};

/**
 * Since size options end up overriding the default format options,
 * they should only ever be hiding something, or making it shorter
 */
const optionsBySize = {
  small: {
    contestNameFormat: 'short',
    contestTypeFormat: 'party-only',
    contestInfoTagSize: '000'
  },
  medium: {
    contestNameFormat: 'medium',
    contestTypeFormat: 'party-only',
    contestInfoTagSize: '100'
  },
  large: {
    contestInfoTagSize: '200'
    // Show everything as defined by the format
  }
};

export { defaultOptions, optionsBySize, optionsByFormat };