import PropTypes from 'prop-types';

const itemShape = {
    id: PropTypes.number,
    name: PropTypes.string,
    description: PropTypes.string,
    iconUrl: PropTypes.string,
    myAppLogoIconUrl: PropTypes.string,
    profileLogoUrl: PropTypes.string,
    features: PropTypes.arrayOf(PropTypes.string),
    startingPrice: PropTypes.shape({
        formattedPrice: PropTypes.string,
        price: PropTypes.string,
        priceCaption: PropTypes.string,
        frequency: PropTypes.shape({
            label: PropTypes.string,
            shortLabel: PropTypes.string,
            id: PropTypes.string
        }),
        symbol: PropTypes.string,
        currency: PropTypes.string
    }),
    tags: PropTypes.arrayOf(PropTypes.string),
    developer: PropTypes.string,
    rating: PropTypes.number,
    numberOfReview: PropTypes.number,
    editionNames: PropTypes.arrayOf(PropTypes.string),
    url: PropTypes.string,
    referUrl: PropTypes.string
};

export const i18nShape = {
    compareApplications: PropTypes.string,
    viewProfile: PropTypes.string,
    name: PropTypes.string,
    description: PropTypes.string,
    features: PropTypes.string,
    startingPrice: PropTypes.string,
    category: PropTypes.string,
    categories: PropTypes.string,
    developer: PropTypes.string,
    rating: PropTypes.string,
    numReview: PropTypes.string,
    numReviews: PropTypes.string,
    nItems: PropTypes.string,
    showDifferences: PropTypes.string,
    editions: PropTypes.string,
    specifications: PropTypes.string,
    screenshots: PropTypes.string,
    remove: PropTypes.string,
    add: PropTypes.string,
    addProductToComparison: PropTypes.string,
    close: PropTypes.string,
    nbselected: PropTypes.string,
    buyNow: PropTypes.string,
    noReviews: PropTypes.string,
    removeProduct: PropTypes.string,
    goToProductPage: PropTypes.string,
    buyProduct: PropTypes.string
};

export const comparableProductsDataShape = {
    items: PropTypes.arrayOf(PropTypes.shape(itemShape)),
    i18n: PropTypes.shape(i18nShape),
    i18nRating: PropTypes.shape({
        label: PropTypes.string
    })
};
