chat system

Goal Design a complete, production-ready mobile chat application layout in TypeScript/React that implements all specified chat features, including header options, message input controls, message actions, chat body features, media handling, chat settings, group chat functionality, and advanced optional features. The layout should be mobile-optimized, fully functional, and organized into reusable components. Return Format Deliver a complete TypeScript/React project structure with: Project folder organization (src/pages/, src/components/, src/types/) TypeScript configuration files (tsconfig.json, tsconfig.app.json, tsconfig.node.json) Fully implemented .tsx component files for each feature section Type definitions for all data structures A main chat page component that integrates all sections CSS/styling approach (inline, CSS modules, or Tailwind - your choice for mobile responsiveness) Brief file-by-file explanation of component purpose and structure Warnings Ensure all interactive elements (buttons, inputs, menus) are touch-friendly with adequate spacing for mobile devices Avoid deeply nested component structures that could impact performance on lower-end mobile devices Message actions (long press/hover) require different UX patterns for mobile (long press) vs desktop (hover) - implement mobile-first approach Media preview functionality (images, videos, PDFs) must handle various file sizes and formats without breaking layout Group chat features should gracefully degrade if user lacks admin permissions Typing indicators and real-time status updates should not cause layout shifts Ensure threaded replies don't create infinite nesting or performance issues Schedule message feature should validate time input and prevent past dates Context """ ๐Ÿ”น Chat Header Options (Top Bar) ๐Ÿ‘ค User profile (avatar + name) ๐ŸŸข Online / Last seen status ๐Ÿ“ž Audio call ๐ŸŽฅ Video call ๐Ÿ” Search in chat โ‹ฎ More options menu ๐Ÿ”น Message Input Options (Bottom Bar) โœ๏ธ Text input box ๐Ÿ˜Š Emoji picker ๐Ÿ“Ž Attachment (file / image / video / PDF) ๐ŸŽค Voice message ๐Ÿ“ท Camera capture ๐Ÿš€ Send button โฑ๏ธ Schedule message (optional) ๐Ÿ”น Message Actions (On Long Press / Hover) ๐Ÿ‘ React (like, love, emoji reactions) โ†ฉ๏ธ Reply ๐Ÿ“ค Forward ๐Ÿ“Œ Pin message ๐Ÿ“ Edit message ๐Ÿ—‘๏ธ Delete (for me / for everyone) ๐Ÿ“‹ Copy text โญ Star / Save message ๐Ÿ”น Chat Body Features ๐Ÿ“… Date separators (Today / Yesterday) โœ”๏ธ Message status (sent, delivered, read) ๐Ÿงต Threaded replies ๐Ÿ“Œ Pinned messages section ๐Ÿ”” Typing indicator ๐Ÿ•’ Time shown on messages ๐Ÿ”น Media & Files ๐Ÿ–ผ๏ธ Image preview โ–ถ๏ธ Video player ๐Ÿ“„ File preview + download ๐Ÿ“Š Document size & type ๐Ÿ• Fullscreen view ๐Ÿ”น Chat Settings (From โ‹ฎ Menu) ๐Ÿ”• Mute / Unmute chat ๐Ÿ“Œ Pin / Unpin chat ๐Ÿงน Clear chat history ๐Ÿšซ Block user ๐Ÿšฉ Report chat ๐Ÿ‘ฅ View participants (for group chat) ๐ŸŽจ Change chat theme / wallpaper ๐Ÿ”น Group Chat Extra Options โž• Add members โž– Remove members ๐Ÿ‘‘ Admin controls ๐Ÿ”’ Read-only mode ๐Ÿ“ข Announcements only ๐Ÿ“ Edit group info ๐Ÿ”น Advanced / Optional (If Needed) ๐Ÿค– AI auto-reply / suggestions ๐ŸŒ Translate message ๐Ÿ” Search by file / link ๐Ÿ“ Share location ๐Ÿ—ณ๏ธ Polls ๐Ÿ•น๏ธ Stickers / GIFs """

Pages