'use strict';

exports.__esModule = true;

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _Main = require('./Main');

var _Main2 = _interopRequireDefault(_Main);

var _createStateManager = require('./createStateManager');

var _createStateManager2 = _interopRequireDefault(_createStateManager);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var initialContent = 'Just add hashtags #primary\n\nCreate rich layouts just by typing #image #unsplash: dessert\n\nCreate fields #field\nAnd Buttons #button #primary\nBig and Small #button #small\n\nFeatures #link: @links.features\n\n@legal #small\n';

/*
	# shorthand #primary
	## shorthand #secondary
	### shorthand #tertiary

	#collected:(hash)
*/

var ingredients = [{
	id: 'links',
	type: 'json',
	variations: [{
		rawContent: '{"features": "https://icing.space/features"}'
	}]
}, {
	id: 'legal',
	type: 'text',
	variations: [{
		rawContent: 'Copyright Company Inc. 2016'
	}]
}];

var scenarios = [{
	links: 0,
	legal: 0
}];

exports.default = _react2.default.createClass({
	displayName: 'App',
	componentWillMount: function componentWillMount() {
		var _props = this.props,
		    initialContent = _props.initialContent,
		    initialDestinationID = _props.initialDestinationID,
		    initialDestinationDevice = _props.initialDestinationDevice,
		    initialIngredients = _props.initialIngredients,
		    initialScenarios = _props.initialScenarios,
		    initialActiveScenarioIndex = _props.initialActiveScenarioIndex;


		this.stateManager = (0, _createStateManager2.default)({
			content: initialContent,
			ingredients: initialIngredients,
			destinationID: initialDestinationID,
			destinationDevice: initialDestinationDevice,
			scenarios: initialScenarios,
			activeScenarioIndex: initialActiveScenarioIndex
		});
	},
	render: function render() {
		return _react2.default.createElement(_Main2.default, { stateManager: this.stateManager });
	}
});
module.exports = exports['default'];