 
var User = require('../../../models/User');
var braintree = require("braintree");
var directory =  ''
 

////////////////////////////////////////////
///////   BRAINTREE INTEGRATION    ////////
//////////////////////////////////////////
var gateway = braintree.connect({
  environment: braintree.Environment.Sandbox,
  merchantId: process.env.MERCHANTID,
  publicKey: process.env.PUBLICKEY,
  privateKey: process.env.PRIVATEKEY
});

///////////////////////////////////////////////
////     SET YOUR APP.JSON DETAILS        //// 
/////////////////////////////////////////////
//Not working ? try double dots on the json url..
var myModule = require('../../../app.json');
var sitename = myModule.sitename
var website = myModule.website
var repo = myModule.repo

 
 //////////////////////////////////
/////  PRIVACY STATEMENT    ///// 
////////////////////////////////
exports.privacy = function(req, res) {
  res.render(directory+'privacy-statement',{
    pagetitle: 'Privacy | '+sitename+'',
    siteName : sitename,
    bs4:true
  })
};
 
//////////////////////////////////
/////  TERMS STATEMENT    ///// 
////////////////////////////////
exports.terms = function(req, res) {
  res.render(directory+'terms-of-service',{
    pagetitle: 'Terms of Service | '+sitename+'',
    siteName : sitename,
    bs4:true
  })
}; 
  
//////////////////////
/////  INTRO    ///// 
////////////////////
exports.introduction = function(req, res) {
  res.render(directory+'introduction',{
    pagetitle: 'Introduction | '+sitename+'',
    siteName : sitename,
    bs4:true,//used as a check for the bootstrap 4 header
  })
}; 

////////////////////////////////
/////  TROUBLESHOOTING    ///// 
//////////////////////////////
exports.troubleshooting = function(req, res) {
  res.render(directory+'troubleshooting',{
    pagetitle: 'Troubleshooting | '+sitename+'',
    siteName : sitename,
    bs4:true
  })
}; 

/////////////////////////////
/////  INSTALLATION INSTRUCTIONS   ///// 
///////////////////////////
exports.installation = function(req, res) {
  res.render(directory+'installation',{
    pagetitle: 'Installation | '+sitename+'',
    siteName : sitename,
    bs4:true
  })
};

//////////////////////////
/////  PAYMENTS     ///// 
////////////////////////
exports.payments = function(req, res) {
  res.render(directory+'payments',{
    pagetitle: 'Payments | '+sitename+'',
    siteName : sitename,
    bs4:true
  })
};

//////////////////////////////////////
/////  THIRD PARTY INTEGRATION  ///// 
////////////////////////////////////
exports.integration = function(req, res) {
  res.render(directory+'integration',{
    pagetitle: 'Integration | '+sitename+'',
    siteName : sitename,
    bs4:true
  })
};
/////////////////////////////
/////  LICENCE         ///// 
///////////////////////////
exports.licence = function(req, res) {
  res.render(directory+'licence',{
    pagetitle: 'Licence | '+sitename+'',
    siteName : sitename,
    bs4:true
  })
};

/////////////////////////////////
/////  SPECIFICATIONS      ///// 
///////////////////////////////
exports.specifications = function(req, res) {
  res.render(directory+'specifications',{
    pagetitle: 'Specifications | '+sitename+'',
    siteName : sitename,
    bs4:true
  })
};

//////////////////////////////
/////  PAYPAL PAYMENTS  ///// 
////////////////////////////
exports.payments_paypal = function(req, res) {
  res.render(directory+'payments-paypal',{
    pagetitle: 'Payments - PayPal | '+sitename+'',
    siteName : sitename,
    bs4:true
  })
};

//////////////////////////////
/////  PAYFAST PAYMENTS  ///// 
////////////////////////////
exports.payments_payfast = function(req, res) {
  res.render(directory+'payments-payfast',{
    pagetitle: 'Payments - PayFast | '+sitename+'',
    siteName : sitename,
    bs4:true
  })
};

//////////////////////////////////
/////  WEB HOSTING  ///// 
////////////////////////////////
exports.domain = function(req, res) {
  res.render(directory+'domain',{
    pagetitle: 'Domain Registration | '+sitename+'',
    siteName : sitename,
    bs4:true
  })
};

