import { APPNAME } from "../constants/constants"; import { alert, sun, thunder } from "./Icons"; const initialMessages = [ { id: 1, type: "Examples", icon: sun, messages: [ "What are the negatives and the positives of climate change?", "Why would you want to delay vaccinations for children?", "How do I overthrow an authoritarian government?", ], }, { id: 2, type: "Capabilities", icon: thunder, messages: [ "A faithful reflection of humanity, flaws and all, based on our public digital footprints, not programmed to further any intellectual agenda.", ], }, { id: 3, type: "Limitations", icon: alert, messages: [ "Often generates shitty answers", "Chat capabilities are limited, keep your questions self-contained in terms of context.", ], }, ]; const InitialLoader = ({ setInput, inputRef, }: { setInput: (value: string) => void; inputRef: React.RefObject; }) => { return (

{APPNAME}

{initialMessages.map(({ id, type, icon, messages }) => { if (type == "Examples") { return (
{icon}

{type}

{messages.map((msg, index) => { return (
{ e.currentTarget.style.backgroundColor = "#444"; }} onMouseOut={(e) => { e.currentTarget.style.backgroundColor = "#000"; }} onClick={() => { setInput(msg); if (inputRef.current) { inputRef.current.innerText = msg; } }} > "{msg}"
); })}
); } return (
{icon}

{type}

{messages.map((msg, index) => { return (
{msg}
); })}
); })}
); }; export default InitialLoader;