import { CircleHalfTiltIcon, ImageIcon, LockIcon, PaintBucketIcon, QuestionIcon, StampIcon, TextAUnderlineIcon, TrayIcon, VaultIcon, XCircleIcon, } from "@phosphor-icons/react"; import { Modal } from "../ui/Modal"; import type { CanvasStyle } from "./ComposeCanvas.tsx"; interface ToolBarProps { onAddImage: () => void; sealBtnClicked: boolean; setSealBtnClicked: (v: boolean) => void; onSave: (status: "SEALED" | "DRAFT" | "VAULT", date?: Date) => Promise; setConfirmModal: (v: "VAULT" | "SEAL" | null) => void; onFontChange: (style: CanvasStyle) => void; latestFontStyle: CanvasStyle; } const FONT_FAMILIES: Map = new Map([ ["Serif", "Playfair Display Variable"], ["Sans", "Jost Variable"], ["Cursive", "Playwrite HR Lijeva Variable"], ["Handwriting", "Architects Daughter"], ["Slab", "Cutive Mono"], ["Mono", "Space Mono"], ["Tamil", "Kavivanar"], ["Crazy(pls no)", "Redacted Script"], ]); const FONT_COLORS: Map = new Map([ ["Black", "#000"], ["Gold", "#866a0e"], ["Purple", "#711caf"], ["Green", "#1f5b1f"], ["Blue", "#111e67"], ]); export function ToolBar({ onAddImage, sealBtnClicked, setSealBtnClicked, onSave, setConfirmModal, onFontChange, latestFontStyle, }: ToolBarProps) { return (
{/* Image upload */}
{/* Font Family */}
{/* Font Color */}
    {Array.from(FONT_COLORS.entries()).map(([_, colorCode]) => (
  • ))}
{/* Draft */}
{/*Seal */}
or
); } export function LetterHead() { return (
Sealed & View Only
); } interface VaultConfirmModalProps { onSave: (status: "SEALED" | "DRAFT" | "VAULT", date?: Date) => Promise; setConfirmModal: (v: "VAULT" | "SEAL" | null) => void; setUnlockDate: (d: Date | null) => void; } export function VaultConfirmModal({ onSave, setConfirmModal, setUnlockDate, }: VaultConfirmModalProps) { return (

Take it away, then?

By vaulting this letter, you ask me to hold on to this.
I'll remember to mail you this on the unlock date.
{" "} But I won't let you read or rewrite this letter until then.

{ e.preventDefault(); const formData = new FormData(e.currentTarget); const unlockDateStr = formData.get("vault-date") as string; const newUnlockDate = new Date(unlockDateStr); setUnlockDate(newUnlockDate); await onSave("VAULT", newUnlockDate); setConfirmModal(null); }} id="vault-form" className="min-w-75" >
Set an unlock date
); }