"use client" /** * Pill action from Question hub → Create a question (e.g. "Draft with Leo" + AI badge). * Single implementation — do not duplicate classes on other routes. */ import * as React from "react" import { cn } from "@/lib/utils" export interface LibraryHubCreateTileButtonProps { label: string icon: string onClick: () => void /** When `"AI"`, renders duotone Leo star + uppercase AI chip (hub Leo tile). */ badge?: "AI" | null disabled?: boolean "aria-busy"?: boolean /** Shown instead of `label` when `aria-busy` is true. */ busyLabel?: string className?: string } export function LibraryHubCreateTileButton({ label, icon, onClick, badge = null, disabled = false, "aria-busy": ariaBusy, busyLabel, className, }: LibraryHubCreateTileButtonProps) { const displayLabel = ariaBusy && busyLabel ? busyLabel : label return (