const INITIAL_HTML_SUGGESTIONS = [ 'Hero section', 'Feature section', 'Call-to-action section', 'Pricing table', 'Newsletter sign-up', 'Stats section', 'Testimonial section', 'Blog section', 'Contact form', 'Team section', 'Content section', 'Logo section', 'FAQ section', 'Footer section', 'Header section', 'Product showcase', 'Services section', 'Portfolio section', 'Client logo section', 'Process section', 'Timeline section', 'Gallery section', 'Card section', 'Banner section', 'Subscription section', 'Download section', 'Quote section', 'Video section', 'Map section', 'Countdown section', 'Comparison section', 'Filter section', 'Sort section', 'Search results section', 'Product review section', 'User profile section', 'Dashboard section', 'Notification section', 'Progress section', 'Modal section', 'Tooltip section', 'Dropdown section', 'Carousel section', 'Tab section', 'Accordion section', 'Sticky section', 'Back-to-top section', 'Social proof section', 'Promotional section', 'Event section', 'Form section', ] const EDIT_HTML_SUGGESTIONS = [ 'Make it responsive', 'Change the color scheme', 'Add more space', 'Remove extra space', 'Increase border width', 'Decrease border width', 'Recolor text', 'Change theme to dark', 'Change theme to light', 'Add rounded corners', 'Remove rounded corners', 'Increase shadow depth', 'Decrease shadow depth', 'Add dividers', 'Remove dividers', 'Increase element size', 'Decrease element size', 'Add background pattern', 'Remove background pattern', 'Increase text contrast', 'Decrease text contrast', 'Add subtle animation', 'Remove animation', 'Increase line spacing', 'Decrease line spacing', 'Add image borders', 'Remove image borders', 'Increase icon size', 'Decrease icon size', 'Add section dividers', 'Remove section dividers', 'Increase padding', 'Decrease padding', 'Add hover animations', 'Remove hover animations', 'Increase font weight', 'Decrease font weight', 'Add gradient background', 'Remove gradient background', 'Increase border radius', 'Decrease border radius', 'Add text shadows', 'Remove text shadows', 'Increase opacity', 'Decrease opacity', 'Add box shadows', 'Remove box shadows', 'Increase letter spacing', 'Decrease letter spacing', 'Add overlay effects', 'Remove overlay effects', 'Increase margin', 'Decrease margin', 'Add transition effects', 'Remove transition effects', ] const INITIAL_TEXT_SUGGESTIONS = [ 'Placeholder copy', 'Lorem ipsum', 'Marketing jargon', 'Business speak', 'Something informative', 'A fun fact', 'Whatever comes to mind', ] const EDIT_TEXT_SUGGESTIONS = [ 'Make it flow better', 'Reword it', 'Add more context', 'Make it longer', 'Make it shorter', 'Make it more professional', 'Make it more playful', 'Use fancier words', 'Check the spelling', ] const SUGGESTIONS = { 'initial-html': INITIAL_HTML_SUGGESTIONS, 'edit-html': EDIT_HTML_SUGGESTIONS, 'initial-text': INITIAL_TEXT_SUGGESTIONS, 'edit-text': EDIT_TEXT_SUGGESTIONS, } function shuffleArray(array: string[]): string[] { const shuffledArray = [...array] for(let i = shuffledArray.length - 1; i > 0; i--) { const j = Math.floor(Math.random() * (i + 1)); [shuffledArray[i], shuffledArray[j]] = [shuffledArray[j], shuffledArray[i]] } return shuffledArray } export const getRandomSuggestions = (suggestionsFor: keyof typeof SUGGESTIONS, size = 6) => { const arr = shuffleArray(SUGGESTIONS[suggestionsFor]) if(arr.length <= size) { return arr } const startIndex = Math.floor(Math.random() * (arr.length - size + 1)) return arr.slice(startIndex, startIndex + size) } export const getSuggestions = (suggestionsFor: keyof typeof SUGGESTIONS) => { return SUGGESTIONS[suggestionsFor] }