"use client"; import { ReactNode, CSSProperties } from "react"; import { JM } from "./modal-theme"; export interface SetupProps { workspace: string; onClose: () => void; onBack: () => void; } export function FieldLabel({ children }: { children: ReactNode }) { return ( ); } export function ForWhomSelector({ value, onChange, }: { value: "personal" | "client"; onChange: (v: "personal" | "client") => void; }) { const cardBase: CSSProperties = { flex: 1, border: `1px solid ${JM.border}`, borderRadius: 9, padding: 14, cursor: "pointer", textAlign: "center" as const, background: JM.inputBg, transition: "all 0.15s", fontFamily: JM.fontSans, }; const row = (key: "personal" | "client", emoji: string, title: string, sub: string) => { const sel = value === key; return ( ); }; return (
This project is for…
{row("personal", "🧑‍💻", "Myself", "My own product")} {row("client", "🤝", "A client", "Client project")}
); } export function SetupHeader({ icon, label, tagline, accent, onBack, onClose, }: { icon: string; label: string; tagline: string; accent: string; onBack: () => void; onClose: () => void; }) { return (

{label}

{tagline}

); } export function TextInput({ value, onChange, placeholder, onKeyDown, autoFocus, inputRef, }: { value: string; onChange: (v: string) => void; placeholder?: string; onKeyDown?: (e: React.KeyboardEvent) => void; autoFocus?: boolean; inputRef?: React.RefObject | React.RefObject; }) { const base: CSSProperties = { width: "100%", padding: "10px 13px", marginBottom: 16, borderRadius: 8, border: `1px solid ${JM.border}`, background: JM.inputBg, fontSize: 14, fontFamily: JM.fontSans, color: JM.ink, outline: "none", boxSizing: "border-box", }; return ( onChange(e.target.value)} onKeyDown={onKeyDown} placeholder={placeholder} autoFocus={autoFocus} style={base} onFocus={e => (e.currentTarget.style.borderColor = JM.indigo)} onBlur={e => (e.currentTarget.style.borderColor = JM.border)} /> ); } export function PrimaryButton({ onClick, disabled, loading, children, }: { onClick: () => void; disabled?: boolean; loading?: boolean; children: ReactNode; }) { const active = !disabled && !loading; return ( ); }