{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "matrix-swot-analysis",
  "title": "Matrix Swot Analysis",
  "type": "registry:block",
  "files": [
    {
      "path": "packages/registry-react/blocks/matrix-swot-analysis/MatrixSwotAnalysis.tsx",
      "content": "'use client'\n\nimport * as React from 'react'\nimport {\n  AlertTriangle,\n  Calendar,\n  Check,\n  Clock,\n  Download,\n  Layers,\n  Plus,\n  Share2,\n  ShieldAlert,\n  ShieldCheck,\n  Trash2,\n  TrendingUp,\n  Zap,\n} from 'lucide-react'\nimport { cn } from '@/lib/utils'\nimport { Badge } from '@/components/ui/badge'\nimport { Button } from '@/components/ui/button'\nimport { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from '@/components/ui/card'\nimport { Input } from '@/components/ui/input'\n\nexport interface SwotItem {\n  id: string\n  title: string\n  description: string\n  impact: 'high' | 'medium' | 'low'\n  tag: string\n}\n\nexport interface StrategicInitiative {\n  id: string\n  title: string\n  description: string\n  strategyType: 'SO' | 'WO' | 'ST' | 'WT'\n  strategyLabel: string\n  priority: 'Critical' | 'High' | 'Strategic'\n  timeframe: string\n  targetMetric: string\n}\n\nexport interface MatrixSwotAnalysisProps extends React.HTMLAttributes<HTMLDivElement> {\n  title?: string\n  project?: string\n  lastUpdated?: string\n  initialStrengths?: SwotItem[]\n  initialWeaknesses?: SwotItem[]\n  initialOpportunities?: SwotItem[]\n  initialThreats?: SwotItem[]\n  initiatives?: StrategicInitiative[]\n  readonly?: boolean\n}\n\nconst defaultStrengths: SwotItem[] = [\n  {\n    id: 's-1',\n    title: 'Zero npm dependency overhead',\n    description:\n      'Components are copied directly into consumer project codebases, eliminating semver dependency locks, version skew, and transitive package bloat.',\n    impact: 'high',\n    tag: 'Core Architecture',\n  },\n  {\n    id: 's-2',\n    title: '100% code ownership for consumers',\n    description:\n      'Engineering teams retain complete control over markup, styles, accessibility props, and internal behaviors with zero upstream constraints.',\n    impact: 'high',\n    tag: 'Developer Autonomy',\n  },\n  {\n    id: 's-3',\n    title: 'Dual-framework Vue & React parity',\n    description:\n      'Strict visual, token, and functional symmetry between Vue 3 (Reka UI) and React (Radix UI) enables cross-stack design system alignment.',\n    impact: 'high',\n    tag: 'Market Breadth',\n  },\n  {\n    id: 's-4',\n    title: 'Tailwind v4 OKLCH token architecture',\n    description:\n      'CSS-first theme configuration using semantic surface variables, calibrated dark-mode layering, and WCAG AA compliant contrast ratios.',\n    impact: 'medium',\n    tag: 'Design System',\n  },\n]\n\nconst defaultWeaknesses: SwotItem[] = [\n  {\n    id: 'w-1',\n    title: 'Manual upgrade path without semver',\n    description:\n      'Consuming codebases must manually pull code diffs or re-execute CLI add commands when library enhancements or bug fixes are published.',\n    impact: 'high',\n    tag: 'Maintenance Model',\n  },\n  {\n    id: 'w-2',\n    title: 'Initial learning curve for monorepos',\n    description:\n      'Junior developers accustomed to single-command npm package installs may face an initial cognitive hurdle managing raw unbundled components.',\n    impact: 'medium',\n    tag: 'Developer DX',\n  },\n  {\n    id: 'w-3',\n    title: 'Build time for 1,300+ SSG pages',\n    description:\n      'Synthesizing static island previews, AST code extraction, and multi-format LLM documentation across dual registries requires high memory in CI.',\n    impact: 'medium',\n    tag: 'Tooling Scale',\n  },\n]\n\nconst defaultOpportunities: SwotItem[] = [\n  {\n    id: 'o-1',\n    title: 'AI Copilot workflows demanding raw source code',\n    description:\n      'LLM coding assistants (Claude, Cursor, Copilot) perform substantially better when refactoring transparent local SFCs than navigating opaque compiled dependencies.',\n    impact: 'high',\n    tag: 'AI Ergonomics',\n  },\n  {\n    id: 'o-2',\n    title: 'Enterprise design system white-labeling',\n    description:\n      'B2B organizations seeking unbranded, custom-styled design systems can adopt UIPKGE as their modular, open-source architectural baseline.',\n    impact: 'high',\n    tag: 'Enterprise B2B',\n  },\n  {\n    id: 'o-3',\n    title: 'E-Commerce and Healthcare template verticals',\n    description:\n      'Surging industry appetite for pre-built reference architectures (HRMS, Hospital Management, Logistics tracking) powered by composable blocks.',\n    impact: 'high',\n    tag: 'Vertical Growth',\n  },\n  {\n    id: 'o-4',\n    title: 'Community contributions of domain blocks',\n    description:\n      'Open-source contributors can rapidly publish specialized workflow blocks (radar charts, KYC wizards, audit logs) without semver packaging bottlenecks.',\n    impact: 'medium',\n    tag: 'Community',\n  },\n]\n\nconst defaultThreats: SwotItem[] = [\n  {\n    id: 't-1',\n    title: 'Official shadcn expanding into Vue ecosystem',\n    description:\n      'Potential first-party Vue support by upstream shadcn could consolidate developer attention away from independent unbundled registries.',\n    impact: 'high',\n    tag: 'Competitive Risk',\n  },\n  {\n    id: 't-2',\n    title: 'Upstream Reka UI headless breaking changes',\n    description:\n      'Substantial architectural shifts or breaking release cycles in upstream headless libraries require immediate parity synchronization.',\n    impact: 'high',\n    tag: 'Upstream Drift',\n  },\n  {\n    id: 't-3',\n    title: 'Browser CSS specification shifts',\n    description:\n      'Rapid evolution in CSS @scope, anchor positioning, and native light-dark() CSS functions may require recurring baseline refactoring.',\n    impact: 'medium',\n    tag: 'Web Standards',\n  },\n]\n\nconst defaultInitiatives: StrategicInitiative[] = [\n  {\n    id: 'init-1',\n    title: 'Automate Upstream Sync & Breaking Change Detection',\n    description:\n      'Implement automated CI regression monitoring against Reka UI and upstream shadcn tokens to maintain 100% runtime compatibility without breaking consumer projects.',\n    strategyType: 'SO',\n    strategyLabel: 'SO Strategy (Strengths × Opportunities)',\n    priority: 'Critical',\n    timeframe: 'Q4 2026',\n    targetMetric: '< 24h Upstream Parity Turnaround',\n  },\n  {\n    id: 'init-2',\n    title: 'AI-Native Context & CLI Smart Upgrade Engine',\n    description:\n      'Ship an intelligent CLI diff command and fine-tuned llms.txt vector context to let AI coding agents auto-patch and upgrade local consumer components directly.',\n    strategyType: 'WO',\n    strategyLabel: 'WO Strategy (Weaknesses × Opportunities)',\n    priority: 'High',\n    timeframe: 'Q4 2026',\n    targetMetric: 'Zero-Friction AST Upgrade Patches',\n  },\n  {\n    id: 'init-3',\n    title: 'Curated Vertical Template Packs & Enterprise Baseline',\n    description:\n      'Deliver production-grade Nuxt 4 and Next.js vertical boilerplate templates (HRMS, HMS, Logistics) to eliminate monorepo onboarding friction for enterprise builders.',\n    strategyType: 'ST',\n    strategyLabel: 'ST Strategy (Strengths × Threats)',\n    priority: 'Strategic',\n    timeframe: 'Q1 2027',\n    targetMetric: '4 Turnkey Vertical Reference Apps',\n  },\n]\n\nexport function MatrixSwotAnalysis({\n  title = 'SWOT Strategic Analysis Canvas',\n  project = 'UIPKGE Unbundled UI Registry Strategy · Q3 2026',\n  lastUpdated = 'Aug 21, 2026',\n  initialStrengths = defaultStrengths,\n  initialWeaknesses = defaultWeaknesses,\n  initialOpportunities = defaultOpportunities,\n  initialThreats = defaultThreats,\n  initiatives = defaultInitiatives,\n  readonly = false,\n  className,\n  ...props\n}: MatrixSwotAnalysisProps) {\n  const [strengths, setStrengths] = React.useState<SwotItem[]>(initialStrengths)\n  const [weaknesses, setWeaknesses] = React.useState<SwotItem[]>(initialWeaknesses)\n  const [opportunities, setOpportunities] = React.useState<SwotItem[]>(initialOpportunities)\n  const [threats, setThreats] = React.useState<SwotItem[]>(initialThreats)\n\n  const [inputStrength, setInputStrength] = React.useState('')\n  const [inputWeakness, setInputWeakness] = React.useState('')\n  const [inputOpportunity, setInputOpportunity] = React.useState('')\n  const [inputThreat, setInputThreat] = React.useState('')\n\n  const [isCopied, setIsCopied] = React.useState(false)\n  const [isExporting, setIsExporting] = React.useState(false)\n\n  const totalCards = strengths.length + weaknesses.length + opportunities.length + threats.length\n\n  function handleAddStrength(e: React.FormEvent) {\n    e.preventDefault()\n    const text = inputStrength.trim()\n    if (!text) return\n    setStrengths((prev) => [\n      ...prev,\n      {\n        id: `s-${Date.now()}`,\n        title: text,\n        description: 'Custom strategic strength added during canvas session.',\n        impact: 'high',\n        tag: 'Internal Strategic Advantage',\n      },\n    ])\n    setInputStrength('')\n  }\n\n  function handleRemoveStrength(id: string) {\n    setStrengths((prev) => prev.filter((item) => item.id !== id))\n  }\n\n  function handleAddWeakness(e: React.FormEvent) {\n    e.preventDefault()\n    const text = inputWeakness.trim()\n    if (!text) return\n    setWeaknesses((prev) => [\n      ...prev,\n      {\n        id: `w-${Date.now()}`,\n        title: text,\n        description: 'Custom strategic vulnerability identified for remediation.',\n        impact: 'medium',\n        tag: 'Internal Remediation',\n      },\n    ])\n    setInputWeakness('')\n  }\n\n  function handleRemoveWeakness(id: string) {\n    setWeaknesses((prev) => prev.filter((item) => item.id !== id))\n  }\n\n  function handleAddOpportunity(e: React.FormEvent) {\n    e.preventDefault()\n    const text = inputOpportunity.trim()\n    if (!text) return\n    setOpportunities((prev) => [\n      ...prev,\n      {\n        id: `o-${Date.now()}`,\n        title: text,\n        description: 'External market dynamic or technological growth tailwind.',\n        impact: 'high',\n        tag: 'External Opportunity',\n      },\n    ])\n    setInputOpportunity('')\n  }\n\n  function handleRemoveOpportunity(id: string) {\n    setOpportunities((prev) => prev.filter((item) => item.id !== id))\n  }\n\n  function handleAddThreat(e: React.FormEvent) {\n    e.preventDefault()\n    const text = inputThreat.trim()\n    if (!text) return\n    setThreats((prev) => [\n      ...prev,\n      {\n        id: `t-${Date.now()}`,\n        title: text,\n        description: 'External industry risk factor requiring proactive defensive mitigation.',\n        impact: 'high',\n        tag: 'External Threat',\n      },\n    ])\n    setInputThreat('')\n  }\n\n  function handleRemoveThreat(id: string) {\n    setThreats((prev) => prev.filter((item) => item.id !== id))\n  }\n\n  function handleShare() {\n    if (typeof navigator !== 'undefined' && navigator.clipboard) {\n      navigator.clipboard.writeText(window.location.href)\n      setIsCopied(true)\n      setTimeout(() => setIsCopied(false), 2000)\n    }\n  }\n\n  function handleExportPdf() {\n    setIsExporting(true)\n    setTimeout(() => setIsExporting(false), 1500)\n  }\n\n  return (\n    <div data-slot=\"matrix-swot-analysis\" className={cn('w-full space-y-6', className)} {...props}>\n      {/* Header Surface */}\n      <div className=\"bg-card text-card-foreground flex flex-col gap-5 rounded-xl border p-5 shadow-xs sm:p-6 lg:flex-row lg:items-center lg:justify-between\">\n        <div className=\"space-y-1.5\">\n          <div className=\"flex flex-wrap items-center gap-2\">\n            <h2 className=\"text-xl font-bold tracking-tight sm:text-2xl\">{title}</h2>\n            <Badge wrap variant=\"outline\" className=\"bg-primary/5 text-primary border-primary/20 text-xs font-medium\">\n              2×2 TOWS Matrix\n            </Badge>\n            <Badge wrap variant=\"secondary\" className=\"text-xs font-normal\">\n              {totalCards} Strategic Factors\n            </Badge>\n          </div>\n\n          <div className=\"text-muted-foreground flex flex-wrap items-center gap-x-4 gap-y-1 text-xs sm:text-sm\">\n            <div className=\"flex items-center gap-1.5\">\n              <Layers className=\"size-3.5\" />\n              <span className=\"text-foreground font-medium\">{project}</span>\n            </div>\n            <span className=\"hidden sm:inline\">·</span>\n            <div className=\"flex items-center gap-1.5\">\n              <Calendar className=\"size-3.5\" />\n              <span>Updated {lastUpdated}</span>\n            </div>\n          </div>\n        </div>\n\n        {/* Action Toolbar */}\n        <div className=\"flex flex-wrap items-center gap-2.5\">\n          <Button\n            aria-label=\"Download attachment\"\n            variant=\"outline\"\n            size=\"sm\"\n            className=\"h-9 gap-2 text-xs shadow-xs\"\n            disabled={isExporting}\n            onClick={handleExportPdf}\n          >\n            {!isExporting ? <Download className=\"size-3.5\" /> : <Clock className=\"size-3.5 animate-spin\" />}\n            <span>{isExporting ? 'Generating PDF...' : 'Export Canvas PDF'}</span>\n          </Button>\n\n          <Button variant=\"default\" size=\"sm\" className=\"h-9 gap-2 text-xs shadow-xs\" onClick={handleShare}>\n            {isCopied ? <Check className=\"size-3.5\" /> : <Share2 className=\"size-3.5\" />}\n            <span>{isCopied ? 'Link Copied!' : 'Share Strategy'}</span>\n          </Button>\n        </div>\n      </div>\n\n      {/* 2x2 Matrix Axis Guide Legend */}\n      <div className=\"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-4\">\n        <div className=\"border-success/20 bg-success/5 text-success text-success flex items-center justify-between rounded-lg border px-3.5 py-2.5 text-xs font-medium shadow-xs\">\n          <div className=\"flex items-center gap-2\">\n            <ShieldCheck className=\"text-success size-4 shrink-0\" />\n            <span>Internal Attributes</span>\n          </div>\n          <Badge wrap variant=\"outline\" className=\"border-success/30 bg-success/10 text-xs\">\n            Helpful (+)\n          </Badge>\n        </div>\n\n        <div className=\"border-destructive/20 bg-destructive/5 text-destructive text-destructive flex items-center justify-between rounded-lg border px-3.5 py-2.5 text-xs font-medium shadow-xs\">\n          <div className=\"flex items-center gap-2\">\n            <AlertTriangle className=\"text-destructive size-4 shrink-0\" />\n            <span>Internal Attributes</span>\n          </div>\n          <Badge wrap variant=\"outline\" className=\"border-destructive/30 bg-destructive/10 text-xs\">\n            Harmful (−)\n          </Badge>\n        </div>\n\n        <div className=\"border-info/20 bg-info/5 text-info text-info flex items-center justify-between rounded-lg border px-3.5 py-2.5 text-xs font-medium shadow-xs\">\n          <div className=\"flex items-center gap-2\">\n            <TrendingUp className=\"text-info size-4 shrink-0\" />\n            <span>External Dynamics</span>\n          </div>\n          <Badge wrap variant=\"outline\" className=\"border-info/30 bg-info/10 text-xs\">\n            Helpful (+)\n          </Badge>\n        </div>\n\n        <div className=\"border-warning/20 bg-warning/5 text-warning flex items-center justify-between rounded-lg border px-3.5 py-2.5 text-xs font-medium shadow-xs\">\n          <div className=\"flex items-center gap-2\">\n            <ShieldAlert className=\"text-warning size-4 shrink-0\" />\n            <span>External Dynamics</span>\n          </div>\n          <Badge wrap variant=\"outline\" className=\"border-warning/30 bg-warning/10 text-warning text-xs\">\n            Harmful (−)\n          </Badge>\n        </div>\n      </div>\n\n      {/* 2x2 SWOT Grid */}\n      <div className=\"grid grid-cols-1 gap-6 lg:grid-cols-2\">\n        {/* QUADRANT 1: STRENGTHS (Internal / Positive) */}\n        <Card className=\"border-success/30 border-success/20 flex flex-col justify-between shadow-xs\">\n          <CardHeader className=\"border-border/60 bg-success/5 dark:bg-success/10 border-b pb-4\">\n            <div className=\"flex items-start justify-between gap-3\">\n              <div className=\"flex items-center gap-3\">\n                <div className=\"border-success/20 bg-success/10 text-success text-success flex size-9 items-center justify-center rounded-lg border shadow-xs\">\n                  <ShieldCheck className=\"size-5\" />\n                </div>\n                <div>\n                  <div className=\"flex items-center gap-2\">\n                    <CardTitle className=\"text-base font-bold sm:text-lg\">Strengths</CardTitle>\n                    <Badge wrap className=\"border-success/20 bg-success/15 text-success text-xs font-semibold\">\n                      {strengths.length}\n                    </Badge>\n                  </div>\n                  <CardDescription className=\"text-xs\">\n                    Internal attributes &amp; distinct technical capabilities\n                  </CardDescription>\n                </div>\n              </div>\n\n              <div className=\"flex items-center gap-1.5\">\n                <Badge\n                  wrap\n                  variant=\"outline\"\n                  className=\"border-success/30 text-success text-success hidden text-xs sm:inline-flex\"\n                >\n                  Internal\n                </Badge>\n                <Badge wrap variant=\"outline\" className=\"border-success/30 text-success text-xs\">\n                  Positive\n                </Badge>\n              </div>\n            </div>\n          </CardHeader>\n\n          <CardContent className=\"flex-1 space-y-3 p-4 sm:p-5\">\n            {strengths.map((item) => (\n              <div\n                key={item.id}\n                className=\"group bg-card hover:border-success/40 relative rounded-lg border p-3.5 shadow-xs transition-[border-color,box-shadow]\"\n              >\n                <div className=\"flex items-start justify-between gap-2\">\n                  <div className=\"space-y-1\">\n                    <div className=\"flex flex-wrap items-center gap-2\">\n                      <h4 className=\"text-foreground text-sm leading-snug font-semibold\">{item.title}</h4>\n                      <Badge\n                        wrap\n                        variant=\"outline\"\n                        className=\"border-success/20 bg-success/10 text-success text-xs font-normal\"\n                      >\n                        {item.tag}\n                      </Badge>\n                    </div>\n                    <p className=\"text-muted-foreground text-xs leading-relaxed\">{item.description}</p>\n                  </div>\n\n                  {!readonly && (\n                    <Button\n                      variant=\"ghost\"\n                      size=\"sm\"\n                      className=\"text-muted-foreground hover:text-destructive hover:bg-destructive/10 -mt-1 -mr-1 size-7 shrink-0 p-0 opacity-80 group-hover:opacity-100\"\n                      aria-label=\"Remove strength item\"\n                      onClick={() => handleRemoveStrength(item.id)}\n                    >\n                      <Trash2 className=\"size-3.5\" />\n                    </Button>\n                  )}\n                </div>\n              </div>\n            ))}\n\n            {strengths.length === 0 && (\n              <div className=\"text-muted-foreground rounded-lg border border-dashed py-8 text-center text-xs\">\n                No strength items listed. Add a core advantage below.\n              </div>\n            )}\n          </CardContent>\n\n          {!readonly && (\n            <CardFooter className=\"border-border/60 bg-muted/20 border-t p-3 sm:p-4\">\n              <form className=\"flex w-full items-center gap-2\" onSubmit={handleAddStrength}>\n                <Input\n                  value={inputStrength}\n                  type=\"text\"\n                  placeholder=\"Add key strength... (Press Enter)\"\n                  className=\"h-8.5 text-xs shadow-xs\"\n                  onChange={(e) => setInputStrength(e.target.value)}\n                />\n                <Button\n                  type=\"submit\"\n                  size=\"sm\"\n                  className=\"bg-success hover:bg-success/90 h-8.5 shrink-0 gap-1.5 text-xs text-white shadow-xs\"\n                >\n                  <Plus className=\"size-3.5\" />\n                  <span>Add</span>\n                </Button>\n              </form>\n            </CardFooter>\n          )}\n        </Card>\n\n        {/* QUADRANT 2: WEAKNESSES (Internal / Negative) */}\n        <Card className=\"border-destructive/30 border-destructive/20 flex flex-col justify-between shadow-xs\">\n          <CardHeader className=\"border-border/60 bg-destructive/5 dark:bg-destructive/10 border-b pb-4\">\n            <div className=\"flex items-start justify-between gap-3\">\n              <div className=\"flex items-center gap-3\">\n                <div className=\"border-destructive/20 bg-destructive/10 text-destructive text-destructive flex size-9 items-center justify-center rounded-lg border shadow-xs\">\n                  <AlertTriangle className=\"size-5\" />\n                </div>\n                <div>\n                  <div className=\"flex items-center gap-2\">\n                    <CardTitle className=\"text-base font-bold sm:text-lg\">Weaknesses</CardTitle>\n                    <Badge\n                      wrap\n                      className=\"border-destructive/20 bg-destructive/15 text-destructive text-xs font-semibold\"\n                    >\n                      {weaknesses.length}\n                    </Badge>\n                  </div>\n                  <CardDescription className=\"text-xs\">\n                    Internal limitations &amp; operational friction points\n                  </CardDescription>\n                </div>\n              </div>\n\n              <div className=\"flex items-center gap-1.5\">\n                <Badge\n                  wrap\n                  variant=\"outline\"\n                  className=\"border-destructive/30 text-destructive text-destructive hidden text-xs sm:inline-flex\"\n                >\n                  Internal\n                </Badge>\n                <Badge wrap variant=\"outline\" className=\"border-destructive/30 text-destructive text-xs\">\n                  Negative\n                </Badge>\n              </div>\n            </div>\n          </CardHeader>\n\n          <CardContent className=\"flex-1 space-y-3 p-4 sm:p-5\">\n            {weaknesses.map((item) => (\n              <div\n                key={item.id}\n                className=\"group bg-card hover:border-destructive/40 relative rounded-lg border p-3.5 shadow-xs transition-[border-color,box-shadow]\"\n              >\n                <div className=\"flex items-start justify-between gap-2\">\n                  <div className=\"space-y-1\">\n                    <div className=\"flex flex-wrap items-center gap-2\">\n                      <h4 className=\"text-foreground text-sm leading-snug font-semibold\">{item.title}</h4>\n                      <Badge\n                        wrap\n                        variant=\"outline\"\n                        className=\"border-destructive/20 bg-destructive/10 text-destructive text-xs font-normal\"\n                      >\n                        {item.tag}\n                      </Badge>\n                    </div>\n                    <p className=\"text-muted-foreground text-xs leading-relaxed\">{item.description}</p>\n                  </div>\n\n                  {!readonly && (\n                    <Button\n                      variant=\"ghost\"\n                      size=\"sm\"\n                      className=\"text-muted-foreground hover:text-destructive hover:bg-destructive/10 -mt-1 -mr-1 size-7 shrink-0 p-0 opacity-80 group-hover:opacity-100\"\n                      aria-label=\"Remove weakness item\"\n                      onClick={() => handleRemoveWeakness(item.id)}\n                    >\n                      <Trash2 className=\"size-3.5\" />\n                    </Button>\n                  )}\n                </div>\n              </div>\n            ))}\n\n            {weaknesses.length === 0 && (\n              <div className=\"text-muted-foreground rounded-lg border border-dashed py-8 text-center text-xs\">\n                No weakness items listed. Add an area for improvement below.\n              </div>\n            )}\n          </CardContent>\n\n          {!readonly && (\n            <CardFooter className=\"border-border/60 bg-muted/20 border-t p-3 sm:p-4\">\n              <form className=\"flex w-full items-center gap-2\" onSubmit={handleAddWeakness}>\n                <Input\n                  value={inputWeakness}\n                  type=\"text\"\n                  placeholder=\"Add key weakness... (Press Enter)\"\n                  className=\"h-8.5 text-xs shadow-xs\"\n                  onChange={(e) => setInputWeakness(e.target.value)}\n                />\n                <Button\n                  type=\"submit\"\n                  size=\"sm\"\n                  className=\"bg-destructive hover:bg-destructive/90 h-8.5 shrink-0 gap-1.5 text-xs text-white shadow-xs\"\n                >\n                  <Plus className=\"size-3.5\" />\n                  <span>Add</span>\n                </Button>\n              </form>\n            </CardFooter>\n          )}\n        </Card>\n\n        {/* QUADRANT 3: OPPORTUNITIES (External / Positive) */}\n        <Card className=\"border-info/30 border-info/20 flex flex-col justify-between shadow-xs\">\n          <CardHeader className=\"border-border/60 bg-info/5 dark:bg-info/10 border-b pb-4\">\n            <div className=\"flex items-start justify-between gap-3\">\n              <div className=\"flex items-center gap-3\">\n                <div className=\"border-info/20 bg-info/10 text-info text-info flex size-9 items-center justify-center rounded-lg border shadow-xs\">\n                  <TrendingUp className=\"size-5\" />\n                </div>\n                <div>\n                  <div className=\"flex items-center gap-2\">\n                    <CardTitle className=\"text-base font-bold sm:text-lg\">Opportunities</CardTitle>\n                    <Badge wrap className=\"border-info/20 bg-info/15 text-info text-xs font-semibold\">\n                      {opportunities.length}\n                    </Badge>\n                  </div>\n                  <CardDescription className=\"text-xs\">\n                    External tailwinds &amp; strategic expansion opportunities\n                  </CardDescription>\n                </div>\n              </div>\n\n              <div className=\"flex items-center gap-1.5\">\n                <Badge\n                  wrap\n                  variant=\"outline\"\n                  className=\"border-info/30 text-info text-info hidden text-xs sm:inline-flex\"\n                >\n                  External\n                </Badge>\n                <Badge wrap variant=\"outline\" className=\"border-info/30 text-info text-xs\">\n                  Positive\n                </Badge>\n              </div>\n            </div>\n          </CardHeader>\n\n          <CardContent className=\"flex-1 space-y-3 p-4 sm:p-5\">\n            {opportunities.map((item) => (\n              <div\n                key={item.id}\n                className=\"group bg-card hover:border-info/40 relative rounded-lg border p-3.5 shadow-xs transition-[border-color,box-shadow]\"\n              >\n                <div className=\"flex items-start justify-between gap-2\">\n                  <div className=\"space-y-1\">\n                    <div className=\"flex flex-wrap items-center gap-2\">\n                      <h4 className=\"text-foreground text-sm leading-snug font-semibold\">{item.title}</h4>\n                      <Badge wrap variant=\"outline\" className=\"border-info/20 bg-info/10 text-info text-xs font-normal\">\n                        {item.tag}\n                      </Badge>\n                    </div>\n                    <p className=\"text-muted-foreground text-xs leading-relaxed\">{item.description}</p>\n                  </div>\n\n                  {!readonly && (\n                    <Button\n                      variant=\"ghost\"\n                      size=\"sm\"\n                      className=\"text-muted-foreground hover:text-destructive hover:bg-destructive/10 -mt-1 -mr-1 size-7 shrink-0 p-0 opacity-80 group-hover:opacity-100\"\n                      aria-label=\"Remove opportunity item\"\n                      onClick={() => handleRemoveOpportunity(item.id)}\n                    >\n                      <Trash2 className=\"size-3.5\" />\n                    </Button>\n                  )}\n                </div>\n              </div>\n            ))}\n\n            {opportunities.length === 0 && (\n              <div className=\"text-muted-foreground rounded-lg border border-dashed py-8 text-center text-xs\">\n                No opportunity items listed. Add a market growth vector below.\n              </div>\n            )}\n          </CardContent>\n\n          {!readonly && (\n            <CardFooter className=\"border-border/60 bg-muted/20 border-t p-3 sm:p-4\">\n              <form className=\"flex w-full items-center gap-2\" onSubmit={handleAddOpportunity}>\n                <Input\n                  value={inputOpportunity}\n                  type=\"text\"\n                  placeholder=\"Add key opportunity... (Press Enter)\"\n                  className=\"h-8.5 text-xs shadow-xs\"\n                  onChange={(e) => setInputOpportunity(e.target.value)}\n                />\n                <Button\n                  type=\"submit\"\n                  size=\"sm\"\n                  className=\"bg-info hover:bg-info/90 h-8.5 shrink-0 gap-1.5 text-xs text-white shadow-xs\"\n                >\n                  <Plus className=\"size-3.5\" />\n                  <span>Add</span>\n                </Button>\n              </form>\n            </CardFooter>\n          )}\n        </Card>\n\n        {/* QUADRANT 4: THREATS (External / Negative) */}\n        <Card className=\"border-warning/30 dark:border-warning/20 flex flex-col justify-between shadow-xs\">\n          <CardHeader className=\"border-border/60 bg-warning/5 dark:bg-warning/10 border-b pb-4\">\n            <div className=\"flex items-start justify-between gap-3\">\n              <div className=\"flex items-center gap-3\">\n                <div className=\"border-warning/20 bg-warning/10 text-warning flex size-9 items-center justify-center rounded-lg border shadow-xs\">\n                  <ShieldAlert className=\"size-5\" />\n                </div>\n                <div>\n                  <div className=\"flex items-center gap-2\">\n                    <CardTitle className=\"text-base font-bold sm:text-lg\">Threats</CardTitle>\n                    <Badge wrap className=\"border-warning/20 bg-warning/15 text-warning text-xs font-semibold\">\n                      {threats.length}\n                    </Badge>\n                  </div>\n                  <CardDescription className=\"text-xs\">\n                    External risks, competitive forces &amp; ecosystem shifts\n                  </CardDescription>\n                </div>\n              </div>\n\n              <div className=\"flex items-center gap-1.5\">\n                <Badge wrap variant=\"outline\" className=\"border-warning/30 text-warning hidden text-xs sm:inline-flex\">\n                  External\n                </Badge>\n                <Badge wrap variant=\"outline\" className=\"border-warning/30 text-warning text-xs\">\n                  Negative\n                </Badge>\n              </div>\n            </div>\n          </CardHeader>\n\n          <CardContent className=\"flex-1 space-y-3 p-4 sm:p-5\">\n            {threats.map((item) => (\n              <div\n                key={item.id}\n                className=\"bg-card hover:border-warning/40 relative rounded-lg border p-3.5 shadow-xs transition-[border-color,box-shadow]\"\n              >\n                <div className=\"flex items-start justify-between gap-2\">\n                  <div className=\"space-y-1\">\n                    <div className=\"flex flex-wrap items-center gap-2\">\n                      <h4 className=\"text-foreground text-sm leading-snug font-semibold\">{item.title}</h4>\n                      <Badge\n                        wrap\n                        variant=\"outline\"\n                        className=\"border-warning/20 bg-warning/10 text-warning text-xs font-normal\"\n                      >\n                        {item.tag}\n                      </Badge>\n                    </div>\n                    <p className=\"text-muted-foreground text-xs leading-relaxed\">{item.description}</p>\n                  </div>\n\n                  {!readonly && (\n                    <Button\n                      variant=\"ghost\"\n                      size=\"sm\"\n                      className=\"text-muted-foreground hover:text-destructive hover:bg-destructive/10 -mt-1 -mr-1 size-7 shrink-0 p-0 opacity-80 group-hover:opacity-100\"\n                      aria-label=\"Remove threat item\"\n                      onClick={() => handleRemoveThreat(item.id)}\n                    >\n                      <Trash2 className=\"size-3.5\" />\n                    </Button>\n                  )}\n                </div>\n              </div>\n            ))}\n\n            {threats.length === 0 && (\n              <div className=\"text-muted-foreground rounded-lg border border-dashed py-8 text-center text-xs\">\n                No threat items listed. Add an external risk factor below.\n              </div>\n            )}\n          </CardContent>\n\n          {!readonly && (\n            <CardFooter className=\"border-border/60 bg-muted/20 border-t p-3 sm:p-4\">\n              <form className=\"flex w-full items-center gap-2\" onSubmit={handleAddThreat}>\n                <Input\n                  value={inputThreat}\n                  type=\"text\"\n                  placeholder=\"Add key threat... (Press Enter)\"\n                  className=\"h-8.5 text-xs shadow-xs\"\n                  onChange={(e) => setInputThreat(e.target.value)}\n                />\n                <Button\n                  type=\"submit\"\n                  size=\"sm\"\n                  className=\"bg-warning text-warning-foreground hover:bg-warning/90 h-8.5 shrink-0 gap-1.5 text-xs shadow-xs\"\n                >\n                  <Plus className=\"size-3.5\" />\n                  <span>Add</span>\n                </Button>\n              </form>\n            </CardFooter>\n          )}\n        </Card>\n      </div>\n\n      {/* Strategic Synthesis & Key Next Actions Card (TOWS Strategy) */}\n      <Card className=\"shadow-xs\">\n        <CardHeader className=\"border-border/60 bg-muted/15 border-b pb-4\">\n          <div className=\"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between\">\n            <div className=\"space-y-1\">\n              <div className=\"flex items-center gap-2\">\n                <Zap className=\"text-primary size-4\" />\n                <CardTitle className=\"text-base font-bold sm:text-lg\">\n                  Strategic Synthesis &amp; Key Next Actions\n                </CardTitle>\n              </div>\n              <CardDescription className=\"text-xs\">\n                Actionable strategic initiatives bridging internal capabilities with external market dynamics (TOWS\n                matrix formulation).\n              </CardDescription>\n            </div>\n\n            <Badge wrap variant=\"outline\" className=\"w-fit text-xs font-medium\">\n              {initiatives.length} Active Initiatives\n            </Badge>\n          </div>\n        </CardHeader>\n\n        <CardContent className=\"p-4 sm:p-6\">\n          <div className=\"grid grid-cols-1 gap-4 lg:grid-cols-3\">\n            {initiatives.map((initiative) => (\n              <div\n                key={initiative.id}\n                className=\"bg-muted/30 hover:border-primary/40 flex flex-col justify-between rounded-xl border p-4 shadow-xs transition-[border-color,box-shadow]\"\n              >\n                <div className=\"space-y-3\">\n                  <div className=\"flex items-center justify-between gap-2\">\n                    <Badge\n                      variant=\"outline\"\n                      className={cn(\n                        'text-xs font-semibold',\n                        initiative.strategyType === 'SO' && 'border-success/20 bg-success/10 text-success',\n                        initiative.strategyType === 'WO' && 'border-info/20 bg-info/10 text-info',\n                        initiative.strategyType === 'ST' && 'border-warning/20 bg-warning/10 text-warning',\n                        initiative.strategyType === 'WT' && 'border-destructive/20 bg-destructive/10 text-destructive',\n                      )}\n                    >\n                      {initiative.strategyType} Strategy\n                    </Badge>\n\n                    <Badge\n                      wrap\n                      variant={initiative.priority === 'Critical' ? 'destructive' : 'secondary'}\n                      className=\"text-xs font-medium\"\n                    >\n                      {initiative.priority}\n                    </Badge>\n                  </div>\n\n                  <div className=\"space-y-1.5\">\n                    <h4 className=\"text-foreground text-sm leading-snug font-semibold\">{initiative.title}</h4>\n                    <p className=\"text-muted-foreground text-xs leading-relaxed\">{initiative.description}</p>\n                  </div>\n                </div>\n\n                <div className=\"border-border/50 mt-4 flex items-center justify-between gap-2 border-t pt-3 text-xs\">\n                  <div className=\"text-muted-foreground flex items-center gap-1.5\">\n                    <Clock className=\"size-3.5\" />\n                    <span>{initiative.timeframe}</span>\n                  </div>\n                  <span className=\"bg-primary/10 text-primary rounded px-2 py-0.5 text-xs font-medium\">\n                    {initiative.targetMetric}\n                  </span>\n                </div>\n              </div>\n            ))}\n          </div>\n        </CardContent>\n      </Card>\n    </div>\n  )\n}\n\nexport default MatrixSwotAnalysis\n",
      "type": "registry:block",
      "target": "~/components/blocks/MatrixSwotAnalysis.tsx"
    }
  ],
  "dependencies": [
    "lucide-react"
  ],
  "devDependencies": [],
  "registryDependencies": [
    "https://uipkge.dev/r/react/badge.json",
    "https://uipkge.dev/r/react/button.json",
    "https://uipkge.dev/r/react/card.json",
    "https://uipkge.dev/r/react/input.json"
  ],
  "description": "Strategic planning 2x2 SWOT analysis matrix (Strengths, Weaknesses, Opportunities, Threats) with dynamic card management, quadrant counters, TOWS strategic initiatives, and PDF/share toolbar.",
  "categories": [
    "productivity",
    "dashboard",
    "app",
    "data"
  ]
}