import { useEffect, useRef, useState } from "react"; import { Path, SlotID } from "../constant"; import { IconButton } from "./button"; import { EmojiAvatar } from "./emoji"; import styles from "./new-chat.module.scss"; import LeftIcon from "../icons/left.svg"; import LightningIcon from "../icons/lightning.svg"; import EyeIcon from "../icons/eye.svg"; import { useLocation, useNavigate } from "react-router-dom"; import { Mask, useMaskStore } from "../store/mask"; import Locale from "../locales"; import { useAppConfig, useChatStore } from "../store"; import { MaskAvatar } from "./mask"; import { useCommand } from "../command"; import { showConfirm } from "./ui-lib"; import { BUILTIN_MASK_STORE } from "../masks"; function MaskItem(props: { mask: Mask; onClick?: () => void }) { return (