import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
import { _ as _object_spread_props } from "@swc/helpers/_/_object_spread_props";
import { _ as _object_without_properties } from "@swc/helpers/_/_object_without_properties";
import React from "react";
import { View } from "@tarojs/components";
import classNames from "classnames";
import Price from "../price/index";
import Tag from "../tag/index";
import Image from "../image/index";
import { ComponentDefaults } from "../../utils/typings";
var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
    src: '',
    title: '',
    price: '',
    vipPrice: '',
    shopDescription: '',
    delivery: '',
    shopName: '',
    description: '',
    tag: '',
    priceTag: '',
    extra: ''
});
export var Card = function(props) {
    var _ref = _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 = _object_without_properties(_ref, [
        "className",
        "style",
        "src",
        "title",
        "price",
        "vipPrice",
        "shopDescription",
        "delivery",
        "shopName",
        "tag",
        "priceTag",
        "description",
        "extra"
    ]);
    var classPrefix = 'nut-card';
    return /*#__PURE__*/ React.createElement("div", _object_spread({
        className: classNames(classPrefix, className),
        style: style
    }, rest), /*#__PURE__*/ React.createElement(View, {
        className: "".concat(classPrefix, "-left")
    }, /*#__PURE__*/ React.createElement(Image, {
        src: src
    })), /*#__PURE__*/ React.createElement(View, {
        className: "".concat(classPrefix, "-right")
    }, /*#__PURE__*/ React.createElement(View, {
        className: "".concat(classPrefix, "-right-title")
    }, title), description, /*#__PURE__*/ React.createElement(View, {
        className: "".concat(classPrefix, "-right-price")
    }, price && /*#__PURE__*/ React.createElement(Price, {
        size: "normal",
        price: price
    }), priceTag || vipPrice && /*#__PURE__*/ React.createElement(Price, {
        size: "normal",
        className: "".concat(classPrefix, "-right-price-origin"),
        price: vipPrice
    })), /*#__PURE__*/ React.createElement(View, {
        className: "".concat(classPrefix, "-right-other")
    }, tag || /*#__PURE__*/ React.createElement(React.Fragment, null, shopDescription && /*#__PURE__*/ React.createElement(Tag, {
        type: "danger"
    }, shopDescription), delivery && /*#__PURE__*/ React.createElement(Tag, {
        plain: true
    }, delivery))), /*#__PURE__*/ React.createElement(View, {
        className: "".concat(classPrefix, "-right-shop")
    }, shopName && /*#__PURE__*/ React.createElement(View, {
        className: "".concat(classPrefix, "-right-shop-name")
    }, shopName), extra)));
};
Card.displayName = 'NutCard';
