"use client"
import { type Editor } from "@tiptap/react"
import {
Bold,
Italic,
Underline as UnderlineIcon,
List,
ListOrdered,
Undo,
Redo,
Indent,
Outdent,
RemoveFormatting,
} from "lucide-react"
import { cn } from "@/lib/utils"
import {
MAIL_COMPOSE_TOOLBAR_BTN,
MAIL_COMPOSE_TOOLBAR_BTN_ACTIVE,
MAIL_COMPOSE_TOOLBAR_SEP,
} from "@/lib/mail-chrome-classes"
import {
AlignmentDropdown,
FontDropdown,
FontSizeDropdown,
ColorDropdown,
} from "./compose-formatting-dropdowns"
export function FormattingToolbar({
editor,
}: {
editor: Editor | null
}) {
if (!editor) return null
const btnClass = MAIL_COMPOSE_TOOLBAR_BTN
const activeClass = MAIL_COMPOSE_TOOLBAR_BTN_ACTIVE
const sep =
return (
{/* Undo / Redo */}
{sep}
{/* Font */}
{sep}
{/* Font size */}
{sep}
{/* Bold, Italic, Underline, Colors */}
{sep}
{/* Alignment dropdown, lists, indent/outdent, remove formatting */}
)
}