'use strict';

Object.defineProperty(exports, "__esModule", {
	value: true
});

var _templateObject = _taggedTemplateLiteral(['\n\tdisplay         : flex;\n\talign-items     : center;\n\twidth           : inherit;\n\tjustify-content : space-between;\n\theight          : var(--px-branding-bar-height, 30px);\n\tmax-height      : 67px;\n\tmin-height      : 30px;\n\tbackground-color: var(--px-branding-bar-background-color, black);\n\tfont-size       : var(--px-branding-bar-font-size, 15px);\n\tcolor           : var(--px-branding-bar-logo-and-title-text-color, gray);\n\tpadding\t\t\t: 0 1rem;\n\t@media (max-width: 44em) {\n\t\tdisplay   : none !important;\n\t\tvisibility: hidden;\n\t}\n'], ['\n\tdisplay         : flex;\n\talign-items     : center;\n\twidth           : inherit;\n\tjustify-content : space-between;\n\theight          : var(--px-branding-bar-height, 30px);\n\tmax-height      : 67px;\n\tmin-height      : 30px;\n\tbackground-color: var(--px-branding-bar-background-color, black);\n\tfont-size       : var(--px-branding-bar-font-size, 15px);\n\tcolor           : var(--px-branding-bar-logo-and-title-text-color, gray);\n\tpadding\t\t\t: 0 1rem;\n\t@media (max-width: 44em) {\n\t\tdisplay   : none !important;\n\t\tvisibility: hidden;\n\t}\n']),
    _templateObject2 = _taggedTemplateLiteral(['\n\tmargin-left: .5rem;\n'], ['\n\tmargin-left: .5rem;\n']),
    _templateObject3 = _taggedTemplateLiteral(['\n\tfont-size: 12px;\n\tmargin-right: .2rem;\n'], ['\n\tfont-size: 12px;\n\tmargin-right: .2rem;\n']);

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _pxPredixSvgLogo = require('./px-predix-svg-logo');

var _pxPredixSvgLogo2 = _interopRequireDefault(_pxPredixSvgLogo);

var _pxGeSvgLogo = require('./px-ge-svg-logo');

var _pxGeSvgLogo2 = _interopRequireDefault(_pxGeSvgLogo);

var _styledComponents = require('styled-components');

var _styledComponents2 = _interopRequireDefault(_styledComponents);

var _flex = require('../../flex');

var _flex2 = _interopRequireDefault(_flex);

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

function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }

var BrandingBar = _styledComponents2.default.div(_templateObject);
BrandingBar.displayName = 'BrandingBar';

var BrandingBarTitle = _styledComponents2.default.div(_templateObject2);
BrandingBarTitle.displayName = 'BrandingBarTitle';

var BrandingBarPoweredBy = _styledComponents2.default.div(_templateObject3);
BrandingBarPoweredBy.displayName = 'BrandingBarPoweredBy';

exports.default = function (_ref) {
	var _ref$title = _ref.title,
	    title = _ref$title === undefined ? 'Application Name' : _ref$title,
	    _ref$powered = _ref.powered,
	    powered = _ref$powered === undefined ? 'Powered by React' : _ref$powered,
	    hideLogo = _ref.hideLogo,
	    hidePowered = _ref.hidePowered,
	    children = _ref.children;
	return _react2.default.createElement(
		BrandingBar,
		null,
		_react2.default.createElement(
			_flex2.default,
			{ middle: true },
			_react2.default.createElement(
				_flex2.default,
				{ middle: true },
				!hideLogo && _react2.default.createElement(_pxGeSvgLogo2.default, null)
			),
			_react2.default.createElement(
				_flex2.default,
				{ middle: true },
				_react2.default.createElement(
					BrandingBarTitle,
					null,
					title
				)
			),
			children && _react2.default.createElement(
				'div',
				null,
				children
			)
		),
		_react2.default.createElement(
			_flex2.default,
			{ middle: true },
			!hidePowered && _react2.default.createElement(
				BrandingBarPoweredBy,
				null,
				powered
			),
			!hideLogo && _react2.default.createElement(_pxPredixSvgLogo2.default, { size: 10 })
		)
	);
};