import Layout from './ADLayout'
import $ from 'jquery'

function Config (layouter) {
  if (!(layouter instanceof Layout)) throw new ReferenceError('layouter is required')
  // let _this = this
  // let _layouter = layouter
  const basePath = AD.Layouter.basePath || './'
  const prototype = Config.prototype

  prototype.load = prototype.load || function load (url = 'data/config.json') {
    return $.getJSON(basePath + url).promise()
  }
}
export default Config
