/** * BoostMedia AI Content Generator Admin - Expandable Keywords Component * * Shows first N keyword chips with expand/collapse on click. * * @package BoostMedia_AI * @license GPL-2.0-or-later */ import { useState } from 'react' import { t } from '../../lib/i18n' interface ExpandableKeywordsProps { keywords: string[] limit?: number className?: string } export function ExpandableKeywords({ keywords, limit = 5, className = '' }: ExpandableKeywordsProps) { const [expanded, setExpanded] = useState(false) if (keywords.length === 0) { return — } const isLong = keywords.length > limit const visible = expanded || !isLong ? keywords : keywords.slice(0, limit) const hiddenCount = keywords.length - limit return (