/** * Wishlist Feature Configuration */ // Wishlist settings interface export interface WishlistSettings { enabled: boolean; allowGuests: boolean; buttonPosition: 'after_add_to_cart' | 'before_add_to_cart' | 'custom'; buttonStyle: 'icon_only' | 'text_only' | 'icon_text'; buttonIcon: 'heart' | 'star' | 'bookmark'; buttonText: string; removeText: string; showOnLoop: boolean; loopPosition: 'after_add_to_cart' | 'top_left' | 'top_right' | 'bottom_left' | 'bottom_right'; wishlistPage: number; showInMenu: boolean; menuLocation: string; showCount: boolean; showPopularityCount: boolean; redirectToWishlist: boolean; removeOnAddToCart: boolean; shareButtons: string[]; // Button Styling buttonBgColor: string; buttonTextColor: string; buttonBorderColor: string; buttonBorderRadius: number; buttonBorderWidth: number; buttonPadding: string; buttonFontSize: number; // Button Margins buttonMarginTop: number; buttonMarginBottom: number; buttonMarginLeft: number; buttonMarginRight: number; // Active/In Wishlist State buttonActiveBgColor: string; buttonActiveTextColor: string; buttonActiveBorderColor: string; // Hover State buttonHoverBgColor: string; buttonHoverTextColor: string; buttonHoverBorderColor: string; // Grid/Loop Button Styling gridButtonSize: number; gridButtonBgColor: string; gridButtonIconColor: string; gridButtonActiveColor: string; gridButtonShadow: boolean; gridButtonOffset: number; // Toast/Popup Notification toastEnabled: boolean; toastPosition: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'top-center' | 'bottom-center'; toastDuration: number; toastBgColor: string; toastTextColor: string; toastBorderRadius: number; toastShadow: 'none' | 'small' | 'medium' | 'large'; toastShowIcon: boolean; toastAnimation: 'fade' | 'slide' | 'bounce'; // Wishlist Page Styling pageTemplate: 'classic-table' | 'modern-cards' | 'minimal-list'; pageShowImage: boolean; pageShowPrice: boolean; pageShowStock: boolean; pageShowDateAdded: boolean; pageShowAddToCart: boolean; pageShowRemove: boolean; pageImageSize: 'small' | 'medium' | 'large'; pageTableBorderColor: string; pageTableHeaderBg: string; pageTableHoverBg: string; pageAddToCartBg: string; pageAddToCartText: string; pageRemoveColor: string; } // Pro-only settings export interface WishlistProSettings { multipleWishlists: boolean; maxWishlists: number; privacyOptions: boolean; onSaleNotifications: boolean; backInStockNotifications: boolean; analyticsEnabled: boolean; onSaleEmailSubject: string; onSaleEmailHeading: string; onSaleEmailBody: string; onSaleEmailAdditionalContent: string; onSaleEmailPreheaderText: string; backInStockEmailSubject: string; backInStockEmailHeading: string; backInStockEmailBody: string; backInStockEmailAdditionalContent: string; backInStockEmailPreheaderText: string; } // Default settings export const defaultWishlistSettings: WishlistSettings = { enabled: false, allowGuests: true, buttonPosition: 'after_add_to_cart', buttonStyle: 'icon_text', buttonIcon: 'heart', buttonText: 'Add to Wishlist', removeText: 'Remove from Wishlist', showOnLoop: true, loopPosition: 'top_right', wishlistPage: 0, showInMenu: false, menuLocation: 'primary', showCount: true, showPopularityCount: false, redirectToWishlist: false, removeOnAddToCart: false, shareButtons: ['facebook', 'twitter', 'pinterest', 'email'], // Button Styling buttonBgColor: 'transparent', buttonTextColor: '#333333', buttonBorderColor: '#dddddd', buttonBorderRadius: 4, buttonBorderWidth: 1, buttonPadding: '8px 16px', buttonFontSize: 14, // Button Margins buttonMarginTop: 10, buttonMarginBottom: 0, buttonMarginLeft: 0, buttonMarginRight: 0, // Active/In Wishlist State buttonActiveBgColor: '#00226b', buttonActiveTextColor: '#ffffff', buttonActiveBorderColor: '#00226b', // Hover State buttonHoverBgColor: 'transparent', buttonHoverTextColor: '#00226b', buttonHoverBorderColor: '#00226b', // Grid/Loop Button Styling gridButtonSize: 36, gridButtonBgColor: 'rgba(255, 255, 255, 0.9)', gridButtonIconColor: '#333333', gridButtonActiveColor: '#00226b', gridButtonShadow: true, gridButtonOffset: 10, // Toast/Popup Notification toastEnabled: true, toastPosition: 'bottom-right', toastDuration: 3000, toastBgColor: '#333333', toastTextColor: '#ffffff', toastBorderRadius: 8, toastShadow: 'large', toastShowIcon: true, toastAnimation: 'slide', // Wishlist Page Styling pageTemplate: 'classic-table', pageShowImage: true, pageShowPrice: true, pageShowStock: true, pageShowDateAdded: true, pageShowAddToCart: true, pageShowRemove: true, pageImageSize: 'medium', pageTableBorderColor: '#e5e7eb', pageTableHeaderBg: '#f9fafb', pageTableHoverBg: '#f3f4f6', pageAddToCartBg: '#00226b', pageAddToCartText: '#ffffff', pageRemoveColor: '#ef4444', }; export const defaultWishlistProSettings: WishlistProSettings = { multipleWishlists: false, maxWishlists: 10, privacyOptions: true, onSaleNotifications: true, backInStockNotifications: true, analyticsEnabled: true, onSaleEmailSubject: 'Good news! Items on your wishlist are on sale!', onSaleEmailHeading: 'Wishlist items are on sale', onSaleEmailBody: 'Hi {customer_name},\n\nGood news! Some products from your wishlist are currently on sale.', onSaleEmailAdditionalContent: 'These sale prices may be available for a limited time.', onSaleEmailPreheaderText: 'Products from your wishlist are now on sale.', backInStockEmailSubject: 'Items on your wishlist are back in stock!', backInStockEmailHeading: 'Wishlist items are back in stock', backInStockEmailBody: 'Hi {customer_name},\n\nGreat news! Some products from your wishlist are available again.', backInStockEmailAdditionalContent: 'Popular products can sell out quickly, so you may want to order soon.', backInStockEmailPreheaderText: 'Products from your wishlist are available again.', }; // Button position options export const buttonPositionOptions = [ { value: 'after_add_to_cart', label: 'After Add to Cart Button' }, { value: 'before_add_to_cart', label: 'Before Add to Cart Button' }, { value: 'custom', label: 'Custom (Use Shortcode)' }, ]; // Button style options export const buttonStyleOptions = [ { value: 'icon_text', label: 'Icon + Text' }, { value: 'icon_only', label: 'Icon Only' }, { value: 'text_only', label: 'Text Only' }, ]; // Button icon options export const buttonIconOptions = [ { value: 'heart', label: 'Heart' }, { value: 'star', label: 'Star' }, { value: 'bookmark', label: 'Bookmark' }, ]; // Loop position options export const loopPositionOptions = [ { value: 'after_add_to_cart', label: 'After Add to Cart' }, { value: 'top_left', label: 'Top Left Corner' }, { value: 'top_right', label: 'Top Right Corner' }, { value: 'bottom_left', label: 'Bottom Left Corner' }, { value: 'bottom_right', label: 'Bottom Right Corner' }, ]; // Toast position options export const toastPositionOptions = [ { value: 'top-left', label: 'Top Left' }, { value: 'top-center', label: 'Top Center' }, { value: 'top-right', label: 'Top Right' }, { value: 'bottom-left', label: 'Bottom Left' }, { value: 'bottom-center', label: 'Bottom Center' }, { value: 'bottom-right', label: 'Bottom Right' }, ]; // Toast animation options export const toastAnimationOptions = [ { value: 'fade', label: 'Fade' }, { value: 'slide', label: 'Slide' }, { value: 'bounce', label: 'Bounce' }, ]; export const toastShadowOptions = [ { value: 'none', label: 'None' }, { value: 'small', label: 'Subtle' }, { value: 'medium', label: 'Medium' }, { value: 'large', label: 'Strong' }, ]; // Share button options export const shareButtonOptions = [ { value: 'facebook', label: 'Facebook' }, { value: 'twitter', label: 'Twitter/X' }, { value: 'pinterest', label: 'Pinterest' }, { value: 'email', label: 'Email' }, { value: 'whatsapp', label: 'WhatsApp' }, { value: 'copy_link', label: 'Copy Link' }, ]; // Wishlist page template presets export interface WishlistPageTemplatePreset { id: 'classic-table' | 'modern-cards' | 'minimal-list'; name: string; description: string; config: Partial; } export const wishlistPageTemplates: WishlistPageTemplatePreset[] = [ { id: 'classic-table', name: 'Classic Table', description: 'Traditional table layout with all details', config: { pageTemplate: 'classic-table', pageShowImage: true, pageShowPrice: true, pageShowStock: true, pageShowDateAdded: true, pageShowAddToCart: true, pageShowRemove: true, pageImageSize: 'medium', pageTableBorderColor: '#e5e7eb', pageTableHeaderBg: '#f9fafb', pageTableHoverBg: '#f3f4f6', pageAddToCartBg: '#00226b', pageAddToCartText: '#ffffff', pageRemoveColor: '#ef4444', }, }, { id: 'modern-cards', name: 'Modern Cards', description: 'Grid of product cards with clean design', config: { pageTemplate: 'modern-cards', pageShowImage: true, pageShowPrice: true, pageShowStock: false, pageShowDateAdded: false, pageShowAddToCart: true, pageShowRemove: true, pageImageSize: 'large', pageTableBorderColor: '#e5e7eb', pageTableHeaderBg: '#ffffff', pageTableHoverBg: '#f9fafb', pageAddToCartBg: '#18181b', pageAddToCartText: '#ffffff', pageRemoveColor: '#71717a', }, }, { id: 'minimal-list', name: 'Minimal List', description: 'Compact list view for quick browsing', config: { pageTemplate: 'minimal-list', pageShowImage: true, pageShowPrice: true, pageShowStock: false, pageShowDateAdded: false, pageShowAddToCart: true, pageShowRemove: true, pageImageSize: 'small', pageTableBorderColor: '#f3f4f6', pageTableHeaderBg: 'transparent', pageTableHoverBg: '#f9fafb', pageAddToCartBg: '#00226b', pageAddToCartText: '#ffffff', pageRemoveColor: '#9ca3af', }, }, ]; // Analytics data interface export interface WishlistAnalytics { totalWishlists: number; totalItems: number; totalUsers: number; guestWishlists: number; averageItemsPerWishlist: number; topProducts: { productId: number; productName: string; count: number; image: string; }[]; userWishlists: { userId: number; userName: string; userEmail: string; wishlistCount: number; totalItems: number; wishlistNames: string[]; }[]; recentActivity: { date: string; action: 'added' | 'removed' | 'purchased'; productId: number; productName: string; userId: number; userName: string; wishlistName: string; }[]; wishlistsOverTime: { date: string; count: number; }[]; }