'use client' import { XIcon } from 'lucide-react' import { useEffect, useId, useRef, useState, type KeyboardEvent, type ReactNode } from 'react' import { Button } from '@/components/ui/button' import { Popover, PopoverAnchor, PopoverContent } from '@/components/ui/Popover' import type { CampaignListOmniboxChip, CampaignListOmniboxSuggestion, } from '@/lib/campaignListOmnibox' import { cn } from '@/lib/utils' export type CampaignListOmniboxProps = { id?: string label: string placeholder: string chips: readonly CampaignListOmniboxChip[] suggestions: readonly CampaignListOmniboxSuggestion[] query: string onQueryChange: (query: string) => void onSelectSuggestion: (suggestionId: string) => void onRemoveChip: (chipId: string) => void /** Free-text commit (Enter with no arrow selection / default). Domain owns id scheme. */ onCommitQuery?: (query: string) => void onClearAll?: () => void isPending?: boolean /** Domain controls beside the bar (e.g. save bookmark). */ trailing?: ReactNode } /** * B184 — the mobile sticky bar. Applied by every list to its own `