import { Breadcrumbs } from "@/app/components/Breadcrumbs/Breadcrumbs"; import { InternalScreen } from "@/app/components/InternalScreen/InternalScreen"; import { SettingsInput } from "@/app/components/SettingsInput/SettingsInput"; import { Flex, Text } from "@mantine/core"; import { IconChevronRight } from "@tabler/icons-react"; import { useState } from "react"; import animationData from './users.json'; import Lottie from "lottie-react"; import { AnimatedButton } from "@/app/components/AnimatedButton/AnimatedButton"; import { useGroups } from "@/app/providers/DialogProvider/useGroups"; export function CreateGroup() { const [title, setTitle] = useState(""); const [description, setDescription] = useState(""); const {createGroup, loading} = useGroups(); return ( <> Create group chat setTitle(e.target.value)} > Group title, e.g., "Family Chat", helps members identify the group easily. Title cannot be changed after creation. setDescription(e.target.value)} > Group description, e.g., "A group for family members", helps members understand the purpose of the group. Not required. } mt={'lg'} fullWidth animated={[ '#0078ff', '#2ea6ff' ]} onClick={() => createGroup(title, description)} loading={loading}>Create ); }