import { Plus, X } from "lucide-react"; import { useState } from "react"; import { createPortal } from "react-dom"; import { toInt } from "../lib/format"; import { ActionButton } from "./ActionButton"; // CreateBotModal collects the new bot's fields, then hands off to ActionButton // for the usual reason/dry-run/confirm flow -- the token is shown once in // ActionButton's own result panel after confirmation. export function CreateBotModal({ onClose, onCreated }: { onClose: () => void; onCreated: () => void }) { const [ownerID, setOwnerID] = useState(""); const [botName, setBotName] = useState(""); const [botUsername, setBotUsername] = useState(""); return createPortal(
{"Provision a bot account owned by the given user. The token is shown once after confirmation."}