import { css } from 'styled-components/macro'

import {
  ClientConfig,
  ClientIds,
  ClientNames,
} from './types'

const randomHash = () => (
  (Math.random() ** Math.random()) * 9999999999999999
)

export const tunisia: ClientConfig = {
  auth: {
    clientId: ClientIds.Tunisia,
    metaDataUrlParams: `?hash=${randomHash()}`,
  },
  defaultLanguage: 'fr',
  description: '',
  disabledFilters: true,
  disabledHighlights: true,
  disabledPreferences: true,
  name: ClientNames.Tunisia,
  privacyLink: '/privacy-policy-and-statement?client_id=insports-ott-web',
  showSearch: true,
  styles: {
    background: '',
    homePageHeader: css`
      background: radial-gradient(
          160.34% 257.27% at -7.45% 162.22%,
          #2AB7AA 3.27%,
          #02505C 43.69%, #0B2E4D 100%);
    `,
    logo: 'tunis-logo.svg',
    logoHeight: 1.922,
    logoLeft: 1.1,
    logoTop: 1.74,
    logoWidth: 9,
    matchLogoHeight: 1.922,
    matchLogoTopMargin: 1,
    matchLogoWidth: 9,
    matchPageMobileHeaderLogo: css`
      width: 100px;
      height: 21px;
      top: 5px;
    `,
    mobileHeaderLogo: css`
      width: 100px;
      height: 21px;
    `,
    userAccountLogo: css`
      width: 9rem;
      height: 1.922rem;
    `,
  },
  termsLink: '/terms-and-conditions?client_id=insports-ott-web',
  title: 'Diwan Sport - The home of Tunisian Ligue Professionnelle 1',
}
