{
  "$schema": "https://uipkge.dev/schema/registry-item.json",
  "name": "matrix-swot-analysis",
  "title": "Matrix Swot Analysis",
  "type": "registry:block",
  "files": [
    {
      "path": "packages/registry-angular/blocks/matrix-swot-analysis/matrix-swot-analysis.component.ts",
      "content": "// Strategic planning 2x2 SWOT analysis matrix (Strengths, Weaknesses, Opportunities,\n// Threats) with dynamic card management, quadrant counters, TOWS strategic initiatives,\n// and PDF/share toolbar. Port of the React block 1:1.\nimport { ChangeDetectionStrategy, Component, Input, computed, signal } from '@angular/core'\nimport {\n  AlertTriangle,\n  Calendar,\n  Check,\n  Clock,\n  Download,\n  Layers,\n  LucideAngularModule,\n  Plus,\n  Share2,\n  ShieldAlert,\n  ShieldCheck,\n  Trash2,\n  TrendingUp,\n  Zap,\n} from 'lucide-angular'\nimport { cn } from '@/lib/utils'\nimport { UiBadgeComponent } from '@/ui/badge/badge.component'\nimport { UiButtonComponent } from '@/ui/button/button.component'\nimport {\n  UiCardComponent,\n  UiCardContentComponent,\n  UiCardDescriptionComponent,\n  UiCardFooterComponent,\n  UiCardHeaderComponent,\n  UiCardTitleComponent,\n} from '@/ui/card/card.component'\nimport { UiInputComponent } from '@/ui/input/input.component'\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\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\n@Component({\n  changeDetection: ChangeDetectionStrategy.Eager,\n  selector: 'ui-matrix-swot-analysis, [ui-matrix-swot-analysis]',\n  standalone: true,\n  // React renders the root <div> itself: the host stays out of layout and `class` goes to the root.\n  host: { '[attr.class]': '\"contents\"' },\n  imports: [\n    LucideAngularModule,\n    UiBadgeComponent,\n    UiButtonComponent,\n    UiCardComponent,\n    UiCardContentComponent,\n    UiCardDescriptionComponent,\n    UiCardFooterComponent,\n    UiCardHeaderComponent,\n    UiCardTitleComponent,\n    UiInputComponent,\n  ],\n  template: `\n    <div data-slot=\"matrix-swot-analysis\" [class]=\"rootClass\">\n      <!-- Header Surface -->\n      <div\n        class=\"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      >\n        <div class=\"space-y-1.5\">\n          <div class=\"flex flex-wrap items-center gap-2\">\n            <h2 class=\"text-xl font-bold tracking-tight sm:text-2xl\">{{ titleText() }}</h2>\n            <span ui-badge variant=\"outline\" class=\"bg-primary/5 text-primary border-primary/20 text-xs font-medium\">\n              2×2 TOWS Matrix\n            </span>\n            <span ui-badge variant=\"secondary\" class=\"text-xs font-normal\"> {{ totalCards() }} Strategic Factors </span>\n          </div>\n\n          <div class=\"text-muted-foreground flex flex-wrap items-center gap-x-4 gap-y-1 text-xs sm:text-sm\">\n            <div class=\"flex items-center gap-1.5\">\n              <lucide-icon [img]=\"Layers\" class=\"size-3.5\" />\n              <span class=\"text-foreground font-medium\">{{ projectText() }}</span>\n            </div>\n            <span class=\"hidden sm:inline\">·</span>\n            <div class=\"flex items-center gap-1.5\">\n              <lucide-icon [img]=\"Calendar\" class=\"size-3.5\" />\n              <span>Updated {{ lastUpdatedText() }}</span>\n            </div>\n          </div>\n        </div>\n\n        <!-- Action Toolbar -->\n        <div class=\"flex flex-wrap items-center gap-2.5\">\n          <button\n            ui-button\n            aria-label=\"Download attachment\"\n            variant=\"outline\"\n            size=\"sm\"\n            class=\"h-9 gap-2 text-xs shadow-xs\"\n            [disabled]=\"isExporting()\"\n            (click)=\"handleExportPdf()\"\n          >\n            @if (!isExporting()) {\n              <lucide-icon [img]=\"Download\" class=\"size-3.5\" />\n            } @else {\n              <lucide-icon [img]=\"Clock\" class=\"size-3.5 animate-spin\" />\n            }\n            <span>{{ isExporting() ? 'Generating PDF...' : 'Export Canvas PDF' }}</span>\n          </button>\n\n          <button ui-button variant=\"default\" size=\"sm\" class=\"h-9 gap-2 text-xs shadow-xs\" (click)=\"handleShare()\">\n            @if (isCopied()) {\n              <lucide-icon [img]=\"Check\" class=\"size-3.5\" />\n            } @else {\n              <lucide-icon [img]=\"Share2\" class=\"size-3.5\" />\n            }\n            <span>{{ isCopied() ? 'Link Copied!' : 'Share Strategy' }}</span>\n          </button>\n        </div>\n      </div>\n\n      <!-- 2x2 Matrix Axis Guide Legend -->\n      <div class=\"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-4\">\n        <div\n          class=\"border-success/20 bg-success/5 text-success flex items-center justify-between rounded-lg border px-3.5 py-2.5 text-xs font-medium shadow-xs\"\n        >\n          <div class=\"flex items-center gap-2\">\n            <lucide-icon [img]=\"ShieldCheck\" class=\"text-success size-4 shrink-0\" />\n            <span>Internal Attributes</span>\n          </div>\n          <span ui-badge variant=\"outline\" class=\"border-success/30 bg-success/10 text-xs\">Helpful (+)</span>\n        </div>\n\n        <div\n          class=\"border-destructive/20 bg-destructive/5 text-destructive flex items-center justify-between rounded-lg border px-3.5 py-2.5 text-xs font-medium shadow-xs\"\n        >\n          <div class=\"flex items-center gap-2\">\n            <lucide-icon [img]=\"AlertTriangle\" class=\"text-destructive size-4 shrink-0\" />\n            <span>Internal Attributes</span>\n          </div>\n          <span ui-badge variant=\"outline\" class=\"border-destructive/30 bg-destructive/10 text-xs\">Harmful (−)</span>\n        </div>\n\n        <div\n          class=\"border-info/20 bg-info/5 text-info flex items-center justify-between rounded-lg border px-3.5 py-2.5 text-xs font-medium shadow-xs\"\n        >\n          <div class=\"flex items-center gap-2\">\n            <lucide-icon [img]=\"TrendingUp\" class=\"text-info size-4 shrink-0\" />\n            <span>External Dynamics</span>\n          </div>\n          <span ui-badge variant=\"outline\" class=\"border-info/30 bg-info/10 text-xs\">Helpful (+)</span>\n        </div>\n\n        <div\n          class=\"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        >\n          <div class=\"flex items-center gap-2\">\n            <lucide-icon [img]=\"ShieldAlert\" class=\"text-warning size-4 shrink-0\" />\n            <span>External Dynamics</span>\n          </div>\n          <span ui-badge variant=\"outline\" class=\"border-warning/30 bg-warning/10 text-warning text-xs\">\n            Harmful (−)\n          </span>\n        </div>\n      </div>\n\n      <!-- 2x2 SWOT Grid -->\n      <div class=\"grid grid-cols-1 gap-6 lg:grid-cols-2\">\n        <!-- QUADRANT 1: STRENGTHS -->\n        <div ui-card class=\"border-success/30 border-success/20 flex flex-col justify-between shadow-xs\">\n          <div ui-card-header class=\"border-border/60 bg-success/5 dark:bg-success/10 border-b pb-4\">\n            <div class=\"flex items-start justify-between gap-3\">\n              <div class=\"flex items-center gap-3\">\n                <div\n                  class=\"border-success/20 bg-success/10 text-success flex size-9 items-center justify-center rounded-lg border shadow-xs\"\n                >\n                  <lucide-icon [img]=\"ShieldCheck\" class=\"size-5\" />\n                </div>\n                <div>\n                  <div class=\"flex items-center gap-2\">\n                    <h3 ui-card-title class=\"text-base font-bold sm:text-lg\">Strengths</h3>\n                    <span ui-badge class=\"border-success/20 bg-success/15 text-success text-xs font-semibold\">\n                      {{ strengths().length }}\n                    </span>\n                  </div>\n                  <p ui-card-description class=\"text-xs\">Internal attributes &amp; distinct technical capabilities</p>\n                </div>\n              </div>\n              <div class=\"flex items-center gap-1.5\">\n                <span ui-badge variant=\"outline\" class=\"border-success/30 text-success hidden text-xs sm:inline-flex\">\n                  Internal\n                </span>\n                <span ui-badge variant=\"outline\" class=\"border-success/30 text-success text-xs\"> Positive </span>\n              </div>\n            </div>\n          </div>\n\n          <div ui-card-content class=\"flex-1 space-y-3 p-4 sm:p-5\">\n            @for (item of strengths(); track item.id) {\n              <div\n                class=\"group bg-card hover:border-success/40 relative rounded-lg border p-3.5 shadow-xs transition-[border-color,box-shadow]\"\n              >\n                <div class=\"flex items-start justify-between gap-2\">\n                  <div class=\"space-y-1\">\n                    <div class=\"flex flex-wrap items-center gap-2\">\n                      <h4 class=\"text-foreground text-sm leading-snug font-semibold\">{{ item.title }}</h4>\n                      <span\n                        ui-badge\n                        variant=\"outline\"\n                        class=\"border-success/20 bg-success/10 text-success text-xs font-normal\"\n                      >\n                        {{ item.tag }}\n                      </span>\n                    </div>\n                    <p class=\"text-muted-foreground text-xs leading-relaxed\">{{ item.description }}</p>\n                  </div>\n                  @if (!isReadonly()) {\n                    <button\n                      ui-button\n                      variant=\"ghost\"\n                      size=\"sm\"\n                      class=\"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                      (click)=\"removeStrength(item.id)\"\n                    >\n                      <lucide-icon [img]=\"Trash2\" class=\"size-3.5\" />\n                    </button>\n                  }\n                </div>\n              </div>\n            }\n            @if (strengths().length === 0) {\n              <div class=\"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          </div>\n\n          @if (!isReadonly()) {\n            <div ui-card-footer class=\"border-border/60 bg-muted/20 border-t p-3 sm:p-4\">\n              <form class=\"flex w-full items-center gap-2\" (submit)=\"addStrength($event)\">\n                <ui-input\n                  [value]=\"inputStrength()\"\n                  (valueChange)=\"inputStrength.set($event)\"\n                  type=\"text\"\n                  placeholder=\"Add key strength... (Press Enter)\"\n                  class=\"h-8.5 text-xs shadow-xs\"\n                />\n                <button\n                  ui-button\n                  type=\"submit\"\n                  size=\"sm\"\n                  class=\"bg-success hover:bg-success/90 h-8.5 shrink-0 gap-1.5 text-xs text-white shadow-xs\"\n                >\n                  <lucide-icon [img]=\"Plus\" class=\"size-3.5\" />\n                  <span>Add</span>\n                </button>\n              </form>\n            </div>\n          }\n        </div>\n\n        <!-- QUADRANT 2: WEAKNESSES -->\n        <div ui-card class=\"border-destructive/30 border-destructive/20 flex flex-col justify-between shadow-xs\">\n          <div ui-card-header class=\"border-border/60 bg-destructive/5 dark:bg-destructive/10 border-b pb-4\">\n            <div class=\"flex items-start justify-between gap-3\">\n              <div class=\"flex items-center gap-3\">\n                <div\n                  class=\"border-destructive/20 bg-destructive/10 text-destructive flex size-9 items-center justify-center rounded-lg border shadow-xs\"\n                >\n                  <lucide-icon [img]=\"AlertTriangle\" class=\"size-5\" />\n                </div>\n                <div>\n                  <div class=\"flex items-center gap-2\">\n                    <h3 ui-card-title class=\"text-base font-bold sm:text-lg\">Weaknesses</h3>\n                    <span\n                      ui-badge\n                      class=\"border-destructive/20 bg-destructive/15 text-destructive text-xs font-semibold\"\n                    >\n                      {{ weaknesses().length }}\n                    </span>\n                  </div>\n                  <p ui-card-description class=\"text-xs\">Internal limitations &amp; operational friction points</p>\n                </div>\n              </div>\n              <div class=\"flex items-center gap-1.5\">\n                <span\n                  ui-badge\n                  variant=\"outline\"\n                  class=\"border-destructive/30 text-destructive hidden text-xs sm:inline-flex\"\n                >\n                  Internal\n                </span>\n                <span ui-badge variant=\"outline\" class=\"border-destructive/30 text-destructive text-xs\">\n                  Negative\n                </span>\n              </div>\n            </div>\n          </div>\n\n          <div ui-card-content class=\"flex-1 space-y-3 p-4 sm:p-5\">\n            @for (item of weaknesses(); track item.id) {\n              <div\n                class=\"group bg-card hover:border-destructive/40 relative rounded-lg border p-3.5 shadow-xs transition-[border-color,box-shadow]\"\n              >\n                <div class=\"flex items-start justify-between gap-2\">\n                  <div class=\"space-y-1\">\n                    <div class=\"flex flex-wrap items-center gap-2\">\n                      <h4 class=\"text-foreground text-sm leading-snug font-semibold\">{{ item.title }}</h4>\n                      <span\n                        ui-badge\n                        variant=\"outline\"\n                        class=\"border-destructive/20 bg-destructive/10 text-destructive text-xs font-normal\"\n                      >\n                        {{ item.tag }}\n                      </span>\n                    </div>\n                    <p class=\"text-muted-foreground text-xs leading-relaxed\">{{ item.description }}</p>\n                  </div>\n                  @if (!isReadonly()) {\n                    <button\n                      ui-button\n                      variant=\"ghost\"\n                      size=\"sm\"\n                      class=\"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                      (click)=\"removeWeakness(item.id)\"\n                    >\n                      <lucide-icon [img]=\"Trash2\" class=\"size-3.5\" />\n                    </button>\n                  }\n                </div>\n              </div>\n            }\n            @if (weaknesses().length === 0) {\n              <div class=\"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          </div>\n\n          @if (!isReadonly()) {\n            <div ui-card-footer class=\"border-border/60 bg-muted/20 border-t p-3 sm:p-4\">\n              <form class=\"flex w-full items-center gap-2\" (submit)=\"addWeakness($event)\">\n                <ui-input\n                  [value]=\"inputWeakness()\"\n                  (valueChange)=\"inputWeakness.set($event)\"\n                  type=\"text\"\n                  placeholder=\"Add key weakness... (Press Enter)\"\n                  class=\"h-8.5 text-xs shadow-xs\"\n                />\n                <button\n                  ui-button\n                  type=\"submit\"\n                  size=\"sm\"\n                  class=\"bg-destructive hover:bg-destructive/90 h-8.5 shrink-0 gap-1.5 text-xs text-white shadow-xs\"\n                >\n                  <lucide-icon [img]=\"Plus\" class=\"size-3.5\" />\n                  <span>Add</span>\n                </button>\n              </form>\n            </div>\n          }\n        </div>\n\n        <!-- QUADRANT 3: OPPORTUNITIES -->\n        <div ui-card class=\"border-info/30 border-info/20 flex flex-col justify-between shadow-xs\">\n          <div ui-card-header class=\"border-border/60 bg-info/5 dark:bg-info/10 border-b pb-4\">\n            <div class=\"flex items-start justify-between gap-3\">\n              <div class=\"flex items-center gap-3\">\n                <div\n                  class=\"border-info/20 bg-info/10 text-info flex size-9 items-center justify-center rounded-lg border shadow-xs\"\n                >\n                  <lucide-icon [img]=\"TrendingUp\" class=\"size-5\" />\n                </div>\n                <div>\n                  <div class=\"flex items-center gap-2\">\n                    <h3 ui-card-title class=\"text-base font-bold sm:text-lg\">Opportunities</h3>\n                    <span ui-badge class=\"border-info/20 bg-info/15 text-info text-xs font-semibold\">\n                      {{ opportunities().length }}\n                    </span>\n                  </div>\n                  <p ui-card-description class=\"text-xs\">External tailwinds &amp; strategic expansion opportunities</p>\n                </div>\n              </div>\n              <div class=\"flex items-center gap-1.5\">\n                <span ui-badge variant=\"outline\" class=\"border-info/30 text-info hidden text-xs sm:inline-flex\">\n                  External\n                </span>\n                <span ui-badge variant=\"outline\" class=\"border-info/30 text-info text-xs\"> Positive </span>\n              </div>\n            </div>\n          </div>\n\n          <div ui-card-content class=\"flex-1 space-y-3 p-4 sm:p-5\">\n            @for (item of opportunities(); track item.id) {\n              <div\n                class=\"group bg-card hover:border-info/40 relative rounded-lg border p-3.5 shadow-xs transition-[border-color,box-shadow]\"\n              >\n                <div class=\"flex items-start justify-between gap-2\">\n                  <div class=\"space-y-1\">\n                    <div class=\"flex flex-wrap items-center gap-2\">\n                      <h4 class=\"text-foreground text-sm leading-snug font-semibold\">{{ item.title }}</h4>\n                      <span ui-badge variant=\"outline\" class=\"border-info/20 bg-info/10 text-info text-xs font-normal\">\n                        {{ item.tag }}\n                      </span>\n                    </div>\n                    <p class=\"text-muted-foreground text-xs leading-relaxed\">{{ item.description }}</p>\n                  </div>\n                  @if (!isReadonly()) {\n                    <button\n                      ui-button\n                      variant=\"ghost\"\n                      size=\"sm\"\n                      class=\"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                      (click)=\"removeOpportunity(item.id)\"\n                    >\n                      <lucide-icon [img]=\"Trash2\" class=\"size-3.5\" />\n                    </button>\n                  }\n                </div>\n              </div>\n            }\n            @if (opportunities().length === 0) {\n              <div class=\"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          </div>\n\n          @if (!isReadonly()) {\n            <div ui-card-footer class=\"border-border/60 bg-muted/20 border-t p-3 sm:p-4\">\n              <form class=\"flex w-full items-center gap-2\" (submit)=\"addOpportunity($event)\">\n                <ui-input\n                  [value]=\"inputOpportunity()\"\n                  (valueChange)=\"inputOpportunity.set($event)\"\n                  type=\"text\"\n                  placeholder=\"Add key opportunity... (Press Enter)\"\n                  class=\"h-8.5 text-xs shadow-xs\"\n                />\n                <button\n                  ui-button\n                  type=\"submit\"\n                  size=\"sm\"\n                  class=\"bg-info hover:bg-info/90 h-8.5 shrink-0 gap-1.5 text-xs text-white shadow-xs\"\n                >\n                  <lucide-icon [img]=\"Plus\" class=\"size-3.5\" />\n                  <span>Add</span>\n                </button>\n              </form>\n            </div>\n          }\n        </div>\n\n        <!-- QUADRANT 4: THREATS -->\n        <div ui-card class=\"border-warning/30 dark:border-warning/20 flex flex-col justify-between shadow-xs\">\n          <div ui-card-header class=\"border-border/60 bg-warning/5 dark:bg-warning/10 border-b pb-4\">\n            <div class=\"flex items-start justify-between gap-3\">\n              <div class=\"flex items-center gap-3\">\n                <div\n                  class=\"border-warning/20 bg-warning/10 text-warning flex size-9 items-center justify-center rounded-lg border shadow-xs\"\n                >\n                  <lucide-icon [img]=\"ShieldAlert\" class=\"size-5\" />\n                </div>\n                <div>\n                  <div class=\"flex items-center gap-2\">\n                    <h3 ui-card-title class=\"text-base font-bold sm:text-lg\">Threats</h3>\n                    <span ui-badge class=\"border-warning/20 bg-warning/15 text-warning text-xs font-semibold\">\n                      {{ threats().length }}\n                    </span>\n                  </div>\n                  <p ui-card-description class=\"text-xs\">External risks, competitive forces &amp; ecosystem shifts</p>\n                </div>\n              </div>\n              <div class=\"flex items-center gap-1.5\">\n                <span ui-badge variant=\"outline\" class=\"border-warning/30 text-warning hidden text-xs sm:inline-flex\">\n                  External\n                </span>\n                <span ui-badge variant=\"outline\" class=\"border-warning/30 text-warning text-xs\"> Negative </span>\n              </div>\n            </div>\n          </div>\n\n          <div ui-card-content class=\"flex-1 space-y-3 p-4 sm:p-5\">\n            @for (item of threats(); track item.id) {\n              <div\n                class=\"bg-card hover:border-warning/40 relative rounded-lg border p-3.5 shadow-xs transition-[border-color,box-shadow]\"\n              >\n                <div class=\"flex items-start justify-between gap-2\">\n                  <div class=\"space-y-1\">\n                    <div class=\"flex flex-wrap items-center gap-2\">\n                      <h4 class=\"text-foreground text-sm leading-snug font-semibold\">{{ item.title }}</h4>\n                      <span\n                        ui-badge\n                        variant=\"outline\"\n                        class=\"border-warning/20 bg-warning/10 text-warning text-xs font-normal\"\n                      >\n                        {{ item.tag }}\n                      </span>\n                    </div>\n                    <p class=\"text-muted-foreground text-xs leading-relaxed\">{{ item.description }}</p>\n                  </div>\n                  @if (!isReadonly()) {\n                    <button\n                      ui-button\n                      variant=\"ghost\"\n                      size=\"sm\"\n                      class=\"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                      (click)=\"removeThreat(item.id)\"\n                    >\n                      <lucide-icon [img]=\"Trash2\" class=\"size-3.5\" />\n                    </button>\n                  }\n                </div>\n              </div>\n            }\n            @if (threats().length === 0) {\n              <div class=\"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          </div>\n\n          @if (!isReadonly()) {\n            <div ui-card-footer class=\"border-border/60 bg-muted/20 border-t p-3 sm:p-4\">\n              <form class=\"flex w-full items-center gap-2\" (submit)=\"addThreat($event)\">\n                <ui-input\n                  [value]=\"inputThreat()\"\n                  (valueChange)=\"inputThreat.set($event)\"\n                  type=\"text\"\n                  placeholder=\"Add key threat... (Press Enter)\"\n                  class=\"h-8.5 text-xs shadow-xs\"\n                />\n                <button\n                  ui-button\n                  type=\"submit\"\n                  size=\"sm\"\n                  class=\"bg-warning text-warning-foreground hover:bg-warning/90 h-8.5 shrink-0 gap-1.5 text-xs shadow-xs\"\n                >\n                  <lucide-icon [img]=\"Plus\" class=\"size-3.5\" />\n                  <span>Add</span>\n                </button>\n              </form>\n            </div>\n          }\n        </div>\n      </div>\n\n      <!-- Strategic Synthesis & Key Next Actions Card (TOWS Strategy) -->\n      <div ui-card class=\"shadow-xs\">\n        <div ui-card-header class=\"border-border/60 bg-muted/15 border-b pb-4\">\n          <div class=\"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between\">\n            <div class=\"space-y-1\">\n              <div class=\"flex items-center gap-2\">\n                <lucide-icon [img]=\"Zap\" class=\"text-primary size-4\" />\n                <h3 ui-card-title class=\"text-base font-bold sm:text-lg\">Strategic Synthesis &amp; Key Next Actions</h3>\n              </div>\n              <p ui-card-description class=\"text-xs\">\n                Actionable strategic initiatives bridging internal capabilities with external market dynamics (TOWS\n                matrix formulation).\n              </p>\n            </div>\n            <span ui-badge variant=\"outline\" class=\"w-fit text-xs font-medium\">\n              {{ strategicInitiatives().length }} Active Initiatives\n            </span>\n          </div>\n        </div>\n\n        <div ui-card-content class=\"p-4 sm:p-6\">\n          <div class=\"grid grid-cols-1 gap-4 lg:grid-cols-3\">\n            @for (initiative of strategicInitiatives(); track initiative.id) {\n              <div\n                class=\"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 class=\"space-y-3\">\n                  <div class=\"flex items-center justify-between gap-2\">\n                    <span ui-badge variant=\"outline\" [class]=\"strategyBadgeClass(initiative.strategyType)\">\n                      {{ initiative.strategyType }} Strategy\n                    </span>\n                    <span\n                      ui-badge\n                      [variant]=\"initiative.priority === 'Critical' ? 'destructive' : 'secondary'\"\n                      class=\"text-xs font-medium whitespace-normal\"\n                    >\n                      {{ initiative.priority }}\n                    </span>\n                  </div>\n                  <div class=\"space-y-1.5\">\n                    <h4 class=\"text-foreground text-sm leading-snug font-semibold\">{{ initiative.title }}</h4>\n                    <p class=\"text-muted-foreground text-xs leading-relaxed\">{{ initiative.description }}</p>\n                  </div>\n                </div>\n                <div class=\"border-border/50 mt-4 flex items-center justify-between gap-2 border-t pt-3 text-xs\">\n                  <div class=\"text-muted-foreground flex items-center gap-1.5\">\n                    <lucide-icon [img]=\"Clock\" class=\"size-3.5\" />\n                    <span>{{ initiative.timeframe }}</span>\n                  </div>\n                  <span class=\"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        </div>\n      </div>\n    </div>\n  `,\n})\nexport class UiMatrixSwotAnalysisComponent {\n  protected readonly AlertTriangle = AlertTriangle\n  protected readonly Calendar = Calendar\n  protected readonly Check = Check\n  protected readonly Clock = Clock\n  protected readonly Download = Download\n  protected readonly Layers = Layers\n  protected readonly Plus = Plus\n  protected readonly Share2 = Share2\n  protected readonly ShieldAlert = ShieldAlert\n  protected readonly ShieldCheck = ShieldCheck\n  protected readonly Trash2 = Trash2\n  protected readonly TrendingUp = TrendingUp\n  protected readonly Zap = Zap\n\n  @Input() set title(v: string | undefined) {\n    this.titleText.set(v ?? 'SWOT Strategic Analysis Canvas')\n  }\n  @Input() set project(v: string | undefined) {\n    this.projectText.set(v ?? 'UIPKGE Unbundled UI Registry Strategy · Q3 2026')\n  }\n  @Input() set lastUpdated(v: string | undefined) {\n    this.lastUpdatedText.set(v ?? 'Aug 21, 2026')\n  }\n  @Input() set initialStrengths(v: SwotItem[] | undefined) {\n    if (v) this.strengths.set([...v])\n  }\n  @Input() set initialWeaknesses(v: SwotItem[] | undefined) {\n    if (v) this.weaknesses.set([...v])\n  }\n  @Input() set initialOpportunities(v: SwotItem[] | undefined) {\n    if (v) this.opportunities.set([...v])\n  }\n  @Input() set initialThreats(v: SwotItem[] | undefined) {\n    if (v) this.threats.set([...v])\n  }\n  @Input() set initiatives(v: StrategicInitiative[] | undefined) {\n    if (v) this.strategicInitiatives.set([...v])\n  }\n  @Input() set readonly(v: boolean) {\n    this.isReadonly.set(!!v)\n  }\n  @Input('class') className?: string\n\n  readonly titleText = signal('SWOT Strategic Analysis Canvas')\n  readonly projectText = signal('UIPKGE Unbundled UI Registry Strategy · Q3 2026')\n  readonly lastUpdatedText = signal('Aug 21, 2026')\n  readonly isReadonly = signal(false)\n\n  readonly strengths = signal<SwotItem[]>([...defaultStrengths])\n  readonly weaknesses = signal<SwotItem[]>([...defaultWeaknesses])\n  readonly opportunities = signal<SwotItem[]>([...defaultOpportunities])\n  readonly threats = signal<SwotItem[]>([...defaultThreats])\n  readonly strategicInitiatives = signal<StrategicInitiative[]>([...defaultInitiatives])\n\n  readonly inputStrength = signal('')\n  readonly inputWeakness = signal('')\n  readonly inputOpportunity = signal('')\n  readonly inputThreat = signal('')\n\n  readonly isCopied = signal(false)\n  readonly isExporting = signal(false)\n\n  readonly totalCards = computed(\n    () => this.strengths().length + this.weaknesses().length + this.opportunities().length + this.threats().length,\n  )\n\n  get rootClass(): string {\n    return cn('w-full space-y-6', this.className)\n  }\n\n  strategyBadgeClass(t: StrategicInitiative['strategyType']): string {\n    return cn(\n      'text-xs font-semibold',\n      t === 'SO' && 'border-success/20 bg-success/10 text-success',\n      t === 'WO' && 'border-info/20 bg-info/10 text-info',\n      t === 'ST' && 'border-warning/20 bg-warning/10 text-warning',\n      t === 'WT' && 'border-destructive/20 bg-destructive/10 text-destructive',\n    )\n  }\n\n  addStrength(e?: Event): void {\n    e?.preventDefault()\n    const text = this.inputStrength().trim()\n    if (!text) return\n    this.strengths.update((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    this.inputStrength.set('')\n  }\n\n  removeStrength(id: string): void {\n    this.strengths.update((prev) => prev.filter((item) => item.id !== id))\n  }\n\n  addWeakness(e?: Event): void {\n    e?.preventDefault()\n    const text = this.inputWeakness().trim()\n    if (!text) return\n    this.weaknesses.update((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    this.inputWeakness.set('')\n  }\n\n  removeWeakness(id: string): void {\n    this.weaknesses.update((prev) => prev.filter((item) => item.id !== id))\n  }\n\n  addOpportunity(e?: Event): void {\n    e?.preventDefault()\n    const text = this.inputOpportunity().trim()\n    if (!text) return\n    this.opportunities.update((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    this.inputOpportunity.set('')\n  }\n\n  removeOpportunity(id: string): void {\n    this.opportunities.update((prev) => prev.filter((item) => item.id !== id))\n  }\n\n  addThreat(e?: Event): void {\n    e?.preventDefault()\n    const text = this.inputThreat().trim()\n    if (!text) return\n    this.threats.update((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    this.inputThreat.set('')\n  }\n\n  removeThreat(id: string): void {\n    this.threats.update((prev) => prev.filter((item) => item.id !== id))\n  }\n\n  handleShare(): void {\n    if (typeof navigator !== 'undefined' && navigator.clipboard) {\n      navigator.clipboard.writeText(window.location.href)\n      this.isCopied.set(true)\n      setTimeout(() => this.isCopied.set(false), 2000)\n    }\n  }\n\n  handleExportPdf(): void {\n    this.isExporting.set(true)\n    setTimeout(() => this.isExporting.set(false), 1500)\n  }\n}\n",
      "type": "registry:block",
      "target": "~/src/app/components/blocks/matrix-swot-analysis/matrix-swot-analysis.component.ts"
    },
    {
      "path": "packages/registry-angular/blocks/matrix-swot-analysis/index.ts",
      "content": "export {\n  UiMatrixSwotAnalysisComponent,\n  type SwotItem,\n  type StrategicInitiative,\n} from './matrix-swot-analysis.component'\n",
      "type": "registry:block",
      "target": "~/src/app/components/blocks/matrix-swot-analysis/index.ts"
    }
  ],
  "dependencies": [
    "lucide-angular"
  ],
  "devDependencies": [],
  "registryDependencies": [
    "https://uipkge.dev/r/angular/badge.json",
    "https://uipkge.dev/r/angular/button.json",
    "https://uipkge.dev/r/angular/card.json",
    "https://uipkge.dev/r/angular/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"
  ]
}