import { useChatInputState } from "./useChatInputState";
export function useAttachmentState() {
    const { attachments, setAttachments, setStatus } = useChatInputState();
    return {
        attachments,
        addAttachment(attachment) {
            setAttachments([
                ...attachments,
                {
                    id: crypto.randomUUID(),
                    kind: "image",
                    ...attachment,
                },
            ]);
            setStatus("attachment-selected");
        },
        removeAttachment(id) {
            setAttachments(attachments.filter((item) => item.id !== id));
        },
    };
}
