import React from 'react'
import GroupItem from '../../../common/product/marketIndex'
import MUtil from "../../../util/utils";

const marketType = MUtil.marketType();

export interface IPropTypes {
    coverImgUrl: string,
    name: string,
    desc: string,
    price: any,
    link: string,
    purBtnText: string,
    ltTagText: string,
    showTitle: boolean,
    showDesc: boolean,
    showPrice: boolean,
    showPurBtn: boolean,
    showLtTag: boolean,
    style?: object,
    onClick?: any,

    [propsName: string]: any
}

const CLASS = 'shop-pro-';

class ShopListItem extends React.Component<any, any> {
    state: any;

    constructor(props: any) {
        super(props);
        this.state = {}
    }

    componentDidMount(): void {

    }

    render() {
        let props = this.props;
        let data: any = {
            marketType: marketType.GROUPBUY
        };
        let newData = Object.assign(data, this.props);
        return (
            <GroupItem data={newData}>
                {this.props.children}
            </GroupItem>

        );
    }
}

export default ShopListItem;