import PropTypes from 'prop-types';

const productQuickviewTagPropTypes = {
    type: PropTypes.string,
    name: PropTypes.string
};

export const productQuickviewDataPropTypes = {
    id: PropTypes.number,
    name: PropTypes.string,
    blurb: PropTypes.string,
    rating: PropTypes.number,
    numRatings: PropTypes.number,
    overview: PropTypes.string,
    description: PropTypes.string,
    overviewImageUrl: PropTypes.string,
    iconUrl: PropTypes.string,
    url: PropTypes.string,
    iconSrcset: PropTypes.shape({
        default: PropTypes.string
    }),
    startingPrice: PropTypes.shape({
        formattedFullPrice: PropTypes.string,
        formattedPrice: PropTypes.string,
        price: PropTypes.string,
        priceCaption: PropTypes.string,
        frequency: PropTypes.shape({
            label: PropTypes.string,
            shortLabel: PropTypes.string
        })
    }),
    tags: PropTypes.arrayOf(
        PropTypes.shape({
            ...productQuickviewTagPropTypes,
            children: PropTypes.arrayOf(
                PropTypes.shape(productQuickviewTagPropTypes)
            )
        })
    ),
    features: PropTypes.shape({
        items: PropTypes.arrayOf(PropTypes.string)
    }),
    i18n: PropTypes.shape({
        viewDetails: PropTypes.string,
        featuresTitle: PropTypes.string,
        categoriesTitle: PropTypes.string,
        close: PropTypes.string
    })
};
