diff --git a/src/components/interaction-panel/chat.tsx b/src/components/interaction-panel/chat.tsx index 727010e..b386a04 100644 --- a/src/components/interaction-panel/chat.tsx +++ b/src/components/interaction-panel/chat.tsx @@ -1,24 +1,133 @@ -import { useAccountStore } from "@/contexts/AccountContext"; -import { Button } from "../ui/button"; import { observer } from "mobx-react-lite"; +import { useRef, useState } from "react"; +import Arrow from "@/icons/arrow.svg?react"; +import Paperclip from "@/icons/paperclip.svg?react"; +import Clock from "@/icons/clock.svg?react"; +import { cn } from "@/lib/utils"; -export const Chat = observer(() => { - const { isSandboxOpen, setIsSandboxOpen, isMainMenuOpen, setIsMainMenuOpen } = - useAccountStore(); - +const Chat = observer(() => { return ( -
- +
+
); }); + +const WelcomePanel = () => { + return ( +
+
+ + Hi! +
I will help you create a crypto project on Cytonic +
+ + +

Estimated build time: 3 minutes

+
+
+ +
+

+ Choose one of the most common prompts +
below or use your own to begin +

+
+ {[ + { emoji: "🐶", text: "Build a memecoin launchpad" }, + { emoji: "🏦", text: "Build a new stablecoin protocol" }, + { emoji: "🌐", text: "Create a RWA marketplace on Cytonic" }, + { emoji: "📊", text: "Ship a token dashboard" }, + ].map(({ emoji, text }) => ( + + ))} +
+ + +
+
+ ); +}; + +const ChatInput = () => { + const [message, setMessage] = useState(""); + const [showShadow, setShowShadow] = useState(false); + const textareaRef = useRef(null); + + const handleInput = (e: React.ChangeEvent) => { + const el = e.target; + setMessage(el.value); + + el.style.height = "auto"; + el.style.height = `${Math.min(el.scrollHeight, 200)}px`; + + setShowShadow(el.scrollTop + el.clientHeight < el.scrollHeight); + }; + + const handleScroll = () => { + const el = textareaRef.current; + if (!el) return; + setShowShadow(el.scrollTop + el.clientHeight < el.scrollHeight); + }; + + return ( +
+
+