var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }

import React from 'react';
import seeds, { Seed } from 'react-seeds';
import defaultStyler from 'react-sow/default';

import * as colors from '../colors';

var fontSizeForProps = function fontSizeForProps(props) {
	return props.huge ? 21 : props.small ? 14 : 16;
};

export default (function (_ref) {
	var huge = _ref.huge,
	    small = _ref.small,
	    selected = _ref.selected,
	    _ref$padding = _ref.padding,
	    padding = _ref$padding === undefined ? 0 : _ref$padding,
	    _ref$styler = _ref.styler,
	    styler = _ref$styler === undefined ? defaultStyler : _ref$styler,
	    props = _objectWithoutProperties(_ref, ['huge', 'small', 'selected', 'padding', 'styler']);

	return React.createElement(Seed, _extends({ Component: 'button'
	}, props, {
		padding: padding,
		font: { size: fontSizeForProps({ huge: huge, small: small }) },
		text: { color: selected ? colors.light : colors.dark },
		background: { color: selected ? colors.dark : colors.light },
		border: 'none',
		cornerRadius: 0
	}, styler({ selected: selected }), {
		styler: styler
	}));
});