"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Card = void 0;
const tslib_1 = require("tslib");
const components_1 = require("@bluebase/components");
const CardActionArea_1 = tslib_1.__importDefault(require("@material-ui/core/CardActionArea"));
const Card_1 = tslib_1.__importDefault(require("@material-ui/core/Card"));
const react_1 = tslib_1.__importDefault(require("react"));
exports.Card = (props) => {
    const { onPress, style, children } = props, others = tslib_1.__rest(props, ["onPress", "style", "children"]);
    if (onPress === undefined) {
        return (react_1.default.createElement(Card_1.default, Object.assign({ style: style }, others), children));
    }
    return (react_1.default.createElement(Card_1.default, Object.assign({ style: style }, others),
        react_1.default.createElement(CardActionArea_1.default, { onClick: onPress }, children)));
};
exports.Card.deafultProps = components_1.CardDefaultProps;
