const BASE_URL = `${window.location.origin}/${window.location.pathname.split('/').filter((e, i)=>{return i>0 & i<4}).join('/')}`;
const ON = true;
const OFF = false;
const EMPTY_LINK = "javascript:undefined";
const DEFAULT = {
  social: {
    twitter: {
      icon: `${BASE_URL}/assets/images/twitter.png`,
      profile: "https://twitter.com/InnolabM4"
    },
    facebook: {
      icon: `${BASE_URL}/assets/images/facebook.png`,
      profile: "https://www.facebook.com/HfTStuttgart"
    },
    linkedin: {
      icon: `${BASE_URL}/assets/images/linkedin.png`,
      profile: "https://www.linkedin.com/in/justin-hui-091507128/"
    },
    webpage: {
      icon: `${BASE_URL}/assets/images/webpage.png`,
      profile: "https://transfer.hft-stuttgart.de/gitlab/huijustinjing/ar-building-visualization-with-grayscale-filter"
    }
  },
  avatar: `${BASE_URL}/assets/images/avatar.png`
};

let settings = {

  switches: [
    {
      name: "projectName",
      state: OFF
    },
    {
      name: "menu",
      state: OFF
    },
    {
      name: "participants",
      state: ON
    },
    {
      name: "footerLogos",
      state: OFF
    }
  ],

  projectName: "M4_LAB Page Demo",

  menu: [
    {
      menuText: "home",
      link: `${BASE_URL}/home/`
    },
    {
      menuText: "bio",
      link: `${BASE_URL}/bio/`
    },
    {
      menuText: "demo",
      link: "http://example.com"
    }
  ],

  participants: [
    {
      name: "Justin Jing Hui",
      avatar: `${BASE_URL}/assets/images/justin.jpg`,
      email: "huijustinjing@gmail.com",
      social: [
        {
          agent: "linkedin",
          icon: DEFAULT.social.linkedin.icon,
          profile: DEFAULT.social.linkedin.profile
        },
        {
          agent: "webpage",
          icon: DEFAULT.social.webpage.icon,
          profile: "https://transfer.hft-stuttgart.de/gitlab/huijustinjing/ar-building-visualization-with-grayscale-filter"
        }
      ]
    }
  ],

  footerLogos: [
    {
      logo: `${BASE_URL}/assets/logos/Logo_M4_LAB.jpg`,
      href: EMPTY_LINK,
      title: "M4_LAB"
    },
    {
      logo: `${BASE_URL}/assets/logos/logo1.png`,
      href: "http://www.innovative-hochschule.de",
      title: "Innovative Hochschule"
    },
    {
      logo: `${BASE_URL}/assets/logos/logo2.png`,
      href: "https://www.bmbf.de",
      title: "Bundesministerium für Bildung und Forschung"
    },
    {
      logo: `${BASE_URL}/assets/logos/logo3.png`,
      href: "https://www.gwk-bonn.de",
      title: "Die Gemeinsame Wissenschaftskonferenz"
    }
  ]
};
