import * as React from 'react'; import { cn } from '@/lib/utils'; import { KROW_LOGO_URL } from '@/assets/brand'; import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip'; import { useAssistantPanel } from './AssistantPanelContext'; /** * AssistantTrigger — the KROW mark used as a secondary action. * * This is not the application's branding: the navigation logo is untouched. * Here the mark is deliberately smaller and sits in a page's action row, where * it reads as "the intelligent thing this page can do" rather than as a chrome * element. Pages render it beside their own actions. * * It self-hides on pages with no assistant, so a page can render it * unconditionally and never needs to know the placement rules. */ /** @param {any} props */ export function AssistantTrigger({ className = '', size = 'default' }) { const { supported, isOpen, toggle, context } = useAssistantPanel(); if (!supported) return null; const label = isOpen ? 'Close Owliver' : `Ask Owliver about ${context.page}`; const heights = { sm: 'h-8 px-2.5', default: 'h-9 px-3' }; const logoHeights = { sm: 'h-3.5', default: 'h-4' }; return ( {label} ); } export default AssistantTrigger;