'use strict';

var diagnostics = require('../diagnostics.js');
var require$$1 = require('tty');
var namespaceAnsi = require('../modifiers/namespace-ansi.js');
var process_env = require('../adapters/process.env.js');
var console = require('../logger/console.js');

var development;
var hasRequiredDevelopment;

function requireDevelopment () {
	if (hasRequiredDevelopment) return development;
	hasRequiredDevelopment = 1;
	var create = diagnostics.__require();
	var tty = require$$1.isatty(1);

	/**
	 * Create a new diagnostics logger.
	 *
	 * @param {String} namespace The namespace it should enable.
	 * @param {Object} options Additional options.
	 * @returns {Function} The logger.
	 * @public
	 */
	var diagnostics$1 = create(function dev(namespace, options) {
	  options = options || {};
	  options.colors = 'colors' in options ? options.colors : tty;
	  options.namespace = namespace;
	  options.prod = false;
	  options.dev = true;

	  if (!dev.enabled(namespace) && !(options.force || dev.force)) {
	    return dev.nope(options);
	  }
	  
	  return dev.yep(options);
	});

	//
	// Configure the logger for the given environment.
	//
	diagnostics$1.modify(namespaceAnsi.__require());
	diagnostics$1.use(process_env.__require());
	diagnostics$1.set(console.__require());

	//
	// Expose the diagnostics logger.
	//
	development = diagnostics$1;
	return development;
}

exports.__require = requireDevelopment;
