export interface ProductSectionConfig {
  enabled?: boolean;
}

export interface ProductRatingConfig extends ProductSectionConfig {}

export interface ProductReviewsConfig extends ProductSectionConfig {
  pageSize?: number;
  showSummary?: boolean;
  mode?: 'pages' | 'load-more';
}

export interface ProductQuestionsConfig extends ProductSectionConfig {
  pageSize?: number;
  allowSubmission?: boolean;
}

export interface ProductTabsConfig extends ProductSectionConfig {
  items?: Array<'description' | 'specifications' | 'reviews' | 'questions' | 'delivery' | 'warranty'>;
}

export interface ProductRelatedConfig extends ProductSectionConfig {}

export interface ProductActionsConfig extends ProductSectionConfig {
  addToCart?: boolean;
  buyNow?: boolean;
  wishlist?: boolean;
  compare?: boolean;
  share?: boolean;
  notifyMe?: boolean;
}

export interface ProductPageConfig {
  rating?: ProductRatingConfig;
  reviews?: ProductReviewsConfig;
  questions?: ProductQuestionsConfig;
  tabs?: ProductTabsConfig;
  relatedProducts?: ProductRelatedConfig;
  actions?: ProductActionsConfig;
}

export const DEFAULT_PRODUCT_PAGE_CONFIG: Required<ProductPageConfig> = {
  rating: {
    enabled: true
  },
  reviews: {
    enabled: true,
    pageSize: 5,
    showSummary: true,
    mode: 'pages'
  },
  questions: {
    enabled: true,
    pageSize: 5,
    allowSubmission: true
  },
  tabs: {
    enabled: true,
    items: ['description', 'specifications', 'reviews', 'questions', 'delivery', 'warranty']
  },
  relatedProducts: {
    enabled: true
  },
  actions: {
    enabled: true,
    addToCart: true,
    buyNow: true,
    wishlist: true,
    compare: true,
    share: true,
    notifyMe: true
  }
};
