"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "Card", {
    enumerable: true,
    get: function() {
        return Card;
    }
});
var _interop_require_default = require("@swc/helpers/_/_interop_require_default");
var _object_spread = require("@swc/helpers/_/_object_spread");
var _object_spread_props = require("@swc/helpers/_/_object_spread_props");
var _object_without_properties = require("@swc/helpers/_/_object_without_properties");
var _react = /*#__PURE__*/ _interop_require_default._(require("react"));
var _components = require("@tarojs/components");
var _classnames = /*#__PURE__*/ _interop_require_default._(require("classnames"));
var _index = /*#__PURE__*/ _interop_require_default._(require("../price/index"));
var _index1 = /*#__PURE__*/ _interop_require_default._(require("../tag/index"));
var _index2 = /*#__PURE__*/ _interop_require_default._(require("../image/index"));
var _typings = require("../../utils/typings");
var defaultProps = (0, _object_spread_props._)((0, _object_spread._)({}, _typings.ComponentDefaults), {
    src: '',
    title: '',
    price: '',
    vipPrice: '',
    shopDescription: '',
    delivery: '',
    shopName: '',
    description: '',
    tag: '',
    priceTag: '',
    extra: ''
});
var Card = function Card(props) {
    var _ref = (0, _object_spread._)({}, defaultProps, props), className = _ref.className, style = _ref.style, src = _ref.src, title = _ref.title, price = _ref.price, vipPrice = _ref.vipPrice, shopDescription = _ref.shopDescription, delivery = _ref.delivery, shopName = _ref.shopName, tag = _ref.tag, priceTag = _ref.priceTag, description = _ref.description, extra = _ref.extra, rest = (0, _object_without_properties._)(_ref, [
        "className",
        "style",
        "src",
        "title",
        "price",
        "vipPrice",
        "shopDescription",
        "delivery",
        "shopName",
        "tag",
        "priceTag",
        "description",
        "extra"
    ]);
    var classPrefix = 'nut-card';
    return /*#__PURE__*/ _react.default.createElement("div", (0, _object_spread._)({
        className: (0, _classnames.default)(classPrefix, className),
        style: style
    }, rest), /*#__PURE__*/ _react.default.createElement(_components.View, {
        className: "".concat(classPrefix, "-left")
    }, /*#__PURE__*/ _react.default.createElement(_index2.default, {
        src: src
    })), /*#__PURE__*/ _react.default.createElement(_components.View, {
        className: "".concat(classPrefix, "-right")
    }, /*#__PURE__*/ _react.default.createElement(_components.View, {
        className: "".concat(classPrefix, "-right-title")
    }, title), description, /*#__PURE__*/ _react.default.createElement(_components.View, {
        className: "".concat(classPrefix, "-right-price")
    }, price && /*#__PURE__*/ _react.default.createElement(_index.default, {
        size: "normal",
        price: price
    }), priceTag || vipPrice && /*#__PURE__*/ _react.default.createElement(_index.default, {
        size: "normal",
        className: "".concat(classPrefix, "-right-price-origin"),
        price: vipPrice
    })), /*#__PURE__*/ _react.default.createElement(_components.View, {
        className: "".concat(classPrefix, "-right-other")
    }, tag || /*#__PURE__*/ _react.default.createElement(_react.default.Fragment, null, shopDescription && /*#__PURE__*/ _react.default.createElement(_index1.default, {
        type: "danger"
    }, shopDescription), delivery && /*#__PURE__*/ _react.default.createElement(_index1.default, {
        plain: true
    }, delivery))), /*#__PURE__*/ _react.default.createElement(_components.View, {
        className: "".concat(classPrefix, "-right-shop")
    }, shopName && /*#__PURE__*/ _react.default.createElement(_components.View, {
        className: "".concat(classPrefix, "-right-shop-name")
    }, shopName), extra)));
};
Card.displayName = 'NutCard';
