"use strict";
var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
var __rest = (this && this.__rest) || function (s, e) {
    var t = {};
    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
        t[p] = s[p];
    if (s != null && typeof Object.getOwnPropertySymbols === "function")
        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
                t[p[i]] = s[p[i]];
        }
    return t;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Button = void 0;
var react_1 = __importDefault(require("react"));
var styled_components_1 = require("styled-components");
var Button_style_1 = require("./Button.style");
var Button = function (_a) {
    var ref = _a.ref, onClick = _a.onClick, rounded = _a.rounded, outline = _a.outline, bgColor = _a.bgColor, _b = _a.w100, w100 = _b === void 0 ? false : _b, _c = _a.type, type = _c === void 0 ? 'button' : _c, _d = _a.size, size = _d === void 0 ? 'medium' : _d, _e = _a.variant, variant = _e === void 0 ? 'primary' : _e, children = _a.children, rest = __rest(_a, ["ref", "onClick", "rounded", "outline", "bgColor", "w100", "type", "size", "variant", "children"]);
    var theme = styled_components_1.useTheme();
    var _f = (theme !== null && theme !== void 0 ? theme : {}).button, button = _f === void 0 ? {} : _f;
    var defaultColor = button.defaultColor, roundedTheme = button.rounded, outlineTheme = button.outline;
    return (react_1.default.createElement(Button_style_1.ButtonStyle, __assign({ ref: ref, type: type, className: "btn " + (!!size && size) + " " + (!!variant && variant) + " " + ((!!outline || outlineTheme) && 'outline') + " " + ((!!rounded || roundedTheme) && 'rounded'), variant: variant, defaultColor: defaultColor, background: bgColor, w100: w100, onClick: onClick }, rest), children));
};
exports.Button = Button;
//# sourceMappingURL=Button.js.map