var utils = require('../utils');
var path = require('path');
var basePath = process.cwd();

const DEFAULT = {
  title: 'Swanky Docs',
  theme: '../themes/swanky',
  layouts: '../themes/swanky/templates/layouts',
  partials: '../themes/swanky/templates/partials',
  patterns: 'src/patterns'
};

function Site (config) {
  this.title = config.title || DEFAULT.title;
  this.theme =  config.theme ? path.join(basePath, config.theme) : path.resolve(__dirname, DEFAULT.theme);
  this.layouts =  config.layouts ? path.join(basePath, config.layouts) : path.resolve(__dirname, DEFAULT.layouts);
  this.partials =  config.partials ? path.join(basePath, config.partials) : path.resolve(__dirname, DEFAULT.partials);
  this.patterns = path.join(basePath, config.patterns || DEFAULT.patterns);
}

module.exports = Site;
