{
  "$schema": "https://uipkge.dev/schema/registry-item.json",
  "name": "return-merchandise-inspection",
  "title": "Return Merchandise Inspection",
  "type": "registry:block",
  "files": [
    {
      "path": "packages/registry-angular/blocks/return-merchandise-inspection/return-merchandise-inspection.component.ts",
      "content": "// Warehouse returns intake inspection station: RMA condition grading, restock vs\n// quarantine disposition routing, and customer refund action workbench with a post-submission\n// disposition receipt. Port of the React block 1:1.\nimport { ChangeDetectionStrategy, Component, EventEmitter, Input, Output, computed, signal } from '@angular/core'\nimport {\n  AlertTriangle,\n  ArrowRight,\n  Barcode,\n  Box,\n  CheckCircle2,\n  Clock,\n  CornerDownLeft,\n  CreditCard,\n  Download,\n  FileCheck,\n  Gift,\n  LucideAngularModule,\n  Package,\n  PackageCheck,\n  Printer,\n  Radio,\n  RotateCcw,\n  ScanLine,\n  Tag,\n  UserCheck,\n  Warehouse,\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 { UiCheckboxComponent, type CheckedState } from '@/ui/checkbox/checkbox.component'\nimport { UiRadioGroupComponent, UiRadioGroupItemComponent } from '@/ui/radio-group/radio-group.component'\nimport { UiSeparatorComponent } from '@/ui/separator/separator.component'\nimport { UiTextareaComponent } from '@/ui/textarea/textarea.component'\n\nexport type ConditionGrade = 'grade-a' | 'grade-b' | 'grade-c' | 'grade-d'\nexport type RefundAction = 'full-refund' | 'store-credit' | 'restock-fee'\n\nexport interface InspectionChecklist {\n  tagsAttached: boolean\n  originalBox: boolean\n  allAccessories: boolean\n  odorStainFree: boolean\n}\n\nexport interface ReturnInspectionData {\n  rmaNumber: string\n  stationId: string\n  inspectorName: string\n  returnReason: string\n  item: {\n    name: string\n    variant: string\n    msrp: number\n    sku: string\n    upc: string\n    verified: boolean\n  }\n  grade: ConditionGrade\n  checklist: InspectionChecklist\n  refundAction: RefundAction\n  qcNotes: string\n  dispositionOutcome: {\n    route: string\n    destinationBin: string\n    lpnCode: string\n    priority: string\n  }\n}\n\ninterface GradeDefinition {\n  id: ConditionGrade\n  code: string\n  title: string\n  conditionLabel: string\n  summary: string\n  route: string\n  targetBin: string\n  lpnCode: string\n  priority: string\n  badgeVariant: 'outline' | 'destructive'\n  badgeClasses: string\n  activeBorderBg: string\n  indicatorColor: string\n  statusText: string\n}\n\nconst gradeDefinitions: Record<ConditionGrade, GradeDefinition> = {\n  'grade-a': {\n    id: 'grade-a',\n    code: 'Grade A',\n    title: 'Grade A: Brand New / Unopened',\n    conditionLabel: 'Brand New / Pristine',\n    summary: 'Original tags & packaging intact',\n    route: 'Restock to Primary Inventory',\n    targetBin: 'Aisle 04-B · Bin #04-B-12',\n    lpnCode: 'LPN-849201-RESTOCK-A',\n    priority: 'High · Inventory Replenishment',\n    badgeVariant: 'outline',\n    badgeClasses: 'border-success/30 bg-success/10 text-success font-semibold',\n    activeBorderBg: 'border-success/40 bg-success/5 shadow-xs ring-1 ring-success/20',\n    indicatorColor: 'bg-success',\n    statusText: 'Primary Inventory Restock Approved',\n  },\n  'grade-b': {\n    id: 'grade-b',\n    code: 'Grade B',\n    title: 'Grade B: Open Box / Minor Cosmetic',\n    conditionLabel: 'Open Box / Inspected',\n    summary: 'No functional damage, packaging opened',\n    route: 'Route to Outlet / Refurbished Store',\n    targetBin: 'Secondary Channel · Pallet #03',\n    lpnCode: 'LPN-849201-OUTLET-B',\n    priority: 'Standard · Secondary Routing',\n    badgeVariant: 'outline',\n    badgeClasses: 'border-warning/30 bg-warning/10 text-warning font-semibold',\n    activeBorderBg: 'border-warning/40 bg-warning/5 shadow-xs ring-1 ring-warning/20',\n    indicatorColor: 'bg-warning',\n    statusText: 'Secondary Channel Re-routing',\n  },\n  'grade-c': {\n    id: 'grade-c',\n    code: 'Grade C',\n    title: 'Grade C: Worn / Used',\n    conditionLabel: 'Worn / Blemished',\n    summary: 'Minor wear on soles, visible creasing',\n    route: 'Liquidation Batch #LQ-409',\n    targetBin: 'Bulk Liquidation Pallet #C-88',\n    lpnCode: 'LPN-849201-LIQUIDATE-C',\n    priority: 'Batch Weekly Dispatch',\n    badgeVariant: 'outline',\n    badgeClasses: 'border-orange-500/30 bg-orange-500/10 text-orange-700 dark:text-orange-400 font-semibold',\n    activeBorderBg: 'border-orange-500/40 bg-orange-500/5 dark:bg-orange-950/20 shadow-xs ring-1 ring-orange-500/20',\n    indicatorColor: 'bg-orange-500',\n    statusText: 'Wholesale Liquidation Staging',\n  },\n  'grade-d': {\n    id: 'grade-d',\n    code: 'Grade D',\n    title: 'Grade D: Damaged / Defective',\n    conditionLabel: 'Defective / Damaged',\n    summary: 'Torn fabric, seam defect, structural flaw',\n    route: 'Quarantine / Return to Vendor (RTV)',\n    targetBin: 'Quarantine Bay Q-08 (Vendor Claims)',\n    lpnCode: 'LPN-849201-QUARANTINE-D',\n    priority: 'Urgent · Vendor RTV Credit Hold',\n    badgeVariant: 'destructive',\n    badgeClasses: 'border-destructive/30 bg-destructive/10 text-destructive font-semibold',\n    activeBorderBg: 'border-destructive/40 bg-destructive/5 shadow-xs ring-1 ring-destructive/20',\n    indicatorColor: 'bg-destructive',\n    statusText: 'Quarantine Hold & Vendor Credit Claim',\n  },\n}\n\nconst itemData = {\n  name: 'Aero Minimalist Runner · Size 10.5 · Matte Black',\n  variant: 'Matte Black / US 10.5 M',\n  sku: 'AMR-BLK-105',\n  upc: 'UPC-018249',\n  msrp: 145.0,\n  orderRef: '#ORD-98421',\n  carrier: 'FedEx Return Express',\n  trackingNumber: '7946 1102 9842',\n  returnReason: 'Customer reported wrong size ordered',\n}\n\nconst defaultQcNotes =\n  'Outer packaging opened by customer. All interior packaging materials, extra shoelaces, and brand care card verified in pristine condition. Zero sole wear detected.'\n\n@Component({\n  changeDetection: ChangeDetectionStrategy.Eager,\n  selector: 'ui-return-merchandise-inspection, [ui-return-merchandise-inspection]',\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    UiCheckboxComponent,\n    UiRadioGroupComponent,\n    UiRadioGroupItemComponent,\n    UiSeparatorComponent,\n    UiTextareaComponent,\n  ],\n  template: `\n    <div data-slot=\"return-merchandise-inspection\" [class]=\"rootClass\">\n      @if (submitted()) {\n        <!-- POST-SUBMISSION CONFIRMATION RECEIPT VIEW -->\n        <div class=\"space-y-6\">\n          <div ui-card class=\"border-border overflow-hidden shadow-xs\">\n            <div [class]=\"receiptBannerClass\">\n              <div class=\"relative mx-auto mb-4 size-16\">\n                <span [class]=\"receiptGlowClass\" aria-hidden=\"true\"></span>\n                <span [class]=\"receiptIconWrapClass\">\n                  @if (selectedGrade() !== 'grade-d') {\n                    <lucide-icon [img]=\"PackageCheck\" class=\"size-8\" />\n                  } @else {\n                    <lucide-icon [img]=\"AlertTriangle\" class=\"size-8\" />\n                  }\n                </span>\n              </div>\n\n              <span\n                ui-badge\n                [variant]=\"selectedGrade() === 'grade-d' ? 'destructive' : 'outline'\"\n                [class]=\"receiptBadgeClass\"\n              >\n                RMA Disposition Manifest Dispatched\n              </span>\n\n              <h2 class=\"text-foreground text-2xl font-bold tracking-tight sm:text-3xl\">\n                {{\n                  selectedGrade() === 'grade-d'\n                    ? 'RMA Inspection Flagged · Quarantine RTV Initiated'\n                    : 'Inspection Complete · Automated Routing Logged'\n                }}\n              </h2>\n              <p class=\"text-muted-foreground mx-auto mt-1.5 max-w-2xl text-xs sm:text-sm\">\n                Disposition for <span class=\"text-foreground font-medium\">{{ item.name }}</span> has been recorded.\n                Warehouse routing slip and automated customer refund authorization have been queued.\n              </p>\n\n              <div\n                class=\"border-border bg-muted/60 mt-4 inline-flex flex-wrap items-center gap-2 rounded-full border px-3.5 py-1 text-xs\"\n              >\n                <span class=\"text-muted-foreground font-medium\">RMA Reference:</span>\n                <span class=\"text-foreground font-mono font-bold\">{{ rmaNumber() }}</span>\n                <span class=\"text-muted-foreground font-medium\">LPN:</span>\n                <span class=\"text-foreground font-mono font-bold\">{{ currentGrade().lpnCode }}</span>\n              </div>\n            </div>\n\n            <div ui-card-content class=\"space-y-6 p-6\">\n              <!-- Disposition Summary Meta Grid -->\n              <div class=\"grid gap-4 sm:grid-cols-2 lg:grid-cols-4\">\n                <div class=\"border-border bg-muted/20 space-y-1 rounded-lg border p-3.5\">\n                  <span class=\"text-muted-foreground block text-xs font-medium\">Condition Grade</span>\n                  <span class=\"text-foreground block text-sm font-semibold\">{{ currentGrade().title }}</span>\n                  <span class=\"text-muted-foreground text-xs\">{{ currentGrade().summary }}</span>\n                </div>\n\n                <div class=\"border-border bg-muted/20 space-y-1 rounded-lg border p-3.5\">\n                  <span class=\"text-muted-foreground block text-xs font-medium\">Warehouse Destination</span>\n                  <span class=\"text-foreground block text-sm font-semibold\">{{ currentGrade().targetBin }}</span>\n                  <span class=\"text-muted-foreground text-xs\">{{ currentGrade().route }}</span>\n                </div>\n\n                <div class=\"border-border bg-muted/20 space-y-1 rounded-lg border p-3.5\">\n                  <span class=\"text-muted-foreground block text-xs font-medium\">Customer Resolution</span>\n                  <span class=\"text-foreground block text-sm font-semibold tabular-nums\">\n                    {{ formatCurrency(refundCalculations().totalRefund) }}\n                  </span>\n                  <span class=\"text-muted-foreground block truncate text-xs\">{{\n                    refundCalculations().methodLabel\n                  }}</span>\n                </div>\n\n                <div class=\"border-border bg-muted/20 space-y-1 rounded-lg border p-3.5\">\n                  <span class=\"text-muted-foreground block text-xs font-medium\">QC Inspector</span>\n                  <span class=\"text-foreground block text-sm font-semibold\">{{ inspectorName }}</span>\n                  <span class=\"text-muted-foreground text-xs\">Station #02 · Timestamped</span>\n                </div>\n              </div>\n\n              <!-- LPN Barcode & Routing Pass Box -->\n              <div class=\"border-border bg-muted/15 space-y-3 rounded-xl border p-4 sm:p-5\">\n                <div class=\"flex flex-wrap items-center justify-between gap-2\">\n                  <div class=\"flex flex-wrap items-center gap-2\">\n                    <lucide-icon [img]=\"Barcode\" class=\"text-primary size-4\" />\n                    <span class=\"text-foreground text-xs font-semibold tracking-wide uppercase\">\n                      Pallet / Tote License Plate Number (LPN)\n                    </span>\n                  </div>\n                  <span ui-badge variant=\"outline\" class=\"font-mono text-xs\">READY FOR PUTAWAY</span>\n                </div>\n\n                <div\n                  class=\"border-border bg-card flex flex-col items-center justify-center space-y-2 rounded-lg border p-4 text-center\"\n                >\n                  <!-- Barcode SVG visualization -->\n                  <svg\n                    class=\"text-foreground h-12 w-full max-w-sm\"\n                    viewBox=\"0 0 280 48\"\n                    fill=\"currentColor\"\n                    aria-label=\"LPN Warehouse Barcode\"\n                  >\n                    <rect x=\"0\" y=\"0\" width=\"4\" height=\"48\" />\n                    <rect x=\"7\" y=\"0\" width=\"2\" height=\"48\" />\n                    <rect x=\"12\" y=\"0\" width=\"5\" height=\"48\" />\n                    <rect x=\"20\" y=\"0\" width=\"2\" height=\"48\" />\n                    <rect x=\"25\" y=\"0\" width=\"6\" height=\"48\" />\n                    <rect x=\"34\" y=\"0\" width=\"3\" height=\"48\" />\n                    <rect x=\"40\" y=\"0\" width=\"2\" height=\"48\" />\n                    <rect x=\"45\" y=\"0\" width=\"5\" height=\"48\" />\n                    <rect x=\"53\" y=\"0\" width=\"3\" height=\"48\" />\n                    <rect x=\"60\" y=\"0\" width=\"6\" height=\"48\" />\n                    <rect x=\"69\" y=\"0\" width=\"2\" height=\"48\" />\n                    <rect x=\"74\" y=\"0\" width=\"4\" height=\"48\" />\n                    <rect x=\"81\" y=\"0\" width=\"3\" height=\"48\" />\n                    <rect x=\"88\" y=\"0\" width=\"5\" height=\"48\" />\n                    <rect x=\"96\" y=\"0\" width=\"2\" height=\"48\" />\n                    <rect x=\"101\" y=\"0\" width=\"6\" height=\"48\" />\n                    <rect x=\"110\" y=\"0\" width=\"3\" height=\"48\" />\n                    <rect x=\"116\" y=\"0\" width=\"4\" height=\"48\" />\n                    <rect x=\"123\" y=\"0\" width=\"2\" height=\"48\" />\n                    <rect x=\"128\" y=\"0\" width=\"5\" height=\"48\" />\n                    <rect x=\"136\" y=\"0\" width=\"3\" height=\"48\" />\n                    <rect x=\"142\" y=\"0\" width=\"6\" height=\"48\" />\n                    <rect x=\"151\" y=\"0\" width=\"2\" height=\"48\" />\n                    <rect x=\"156\" y=\"0\" width=\"4\" height=\"48\" />\n                    <rect x=\"163\" y=\"0\" width=\"3\" height=\"48\" />\n                    <rect x=\"170\" y=\"0\" width=\"5\" height=\"48\" />\n                    <rect x=\"178\" y=\"0\" width=\"2\" height=\"48\" />\n                    <rect x=\"183\" y=\"0\" width=\"6\" height=\"48\" />\n                    <rect x=\"192\" y=\"0\" width=\"4\" height=\"48\" />\n                    <rect x=\"199\" y=\"0\" width=\"2\" height=\"48\" />\n                    <rect x=\"204\" y=\"0\" width=\"5\" height=\"48\" />\n                    <rect x=\"212\" y=\"0\" width=\"3\" height=\"48\" />\n                    <rect x=\"218\" y=\"0\" width=\"6\" height=\"48\" />\n                    <rect x=\"227\" y=\"0\" width=\"2\" height=\"48\" />\n                    <rect x=\"232\" y=\"0\" width=\"4\" height=\"48\" />\n                    <rect x=\"239\" y=\"0\" width=\"3\" height=\"48\" />\n                    <rect x=\"245\" y=\"0\" width=\"5\" height=\"48\" />\n                    <rect x=\"253\" y=\"0\" width=\"2\" height=\"48\" />\n                    <rect x=\"258\" y=\"0\" width=\"6\" height=\"48\" />\n                    <rect x=\"267\" y=\"0\" width=\"3\" height=\"48\" />\n                    <rect x=\"273\" y=\"0\" width=\"4\" height=\"48\" />\n                  </svg>\n                  <div class=\"flex items-center gap-3 font-mono text-xs font-bold\">\n                    <span class=\"text-foreground tracking-wider\">{{ currentGrade().lpnCode }}</span>\n                    <span class=\"text-muted-foreground font-normal\">{{ currentGrade().targetBin }}</span>\n                  </div>\n                </div>\n\n                <!-- Inspector Notes Display -->\n                @if (qcNotes()) {\n                  <div class=\"space-y-1 pt-1 text-xs\">\n                    <span class=\"text-muted-foreground font-medium\">Logged Inspector Notes:</span>\n                    <p class=\"border-border bg-card text-foreground rounded-md border p-3 leading-relaxed italic\">\n                      “{{ qcNotes() }}”\n                    </p>\n                  </div>\n                }\n              </div>\n\n              <!-- Actions Strip -->\n              <div class=\"flex flex-wrap items-center justify-between gap-3 pt-2\">\n                <button\n                  ui-button\n                  variant=\"outline\"\n                  size=\"sm\"\n                  class=\"gap-1.5 text-xs font-medium\"\n                  (click)=\"handleReset()\"\n                >\n                  <lucide-icon [img]=\"RotateCcw\" class=\"size-3.5\" />\n                  Start Next RMA Inspection\n                </button>\n\n                <div class=\"flex flex-wrap items-center gap-2\">\n                  <button ui-button variant=\"outline\" size=\"sm\" class=\"gap-1.5 text-xs font-medium\">\n                    <lucide-icon [img]=\"Printer\" class=\"size-3.5\" />\n                    Print LPN Tote Label\n                  </button>\n                  <button ui-button aria-label=\"Download attachment\" size=\"sm\" class=\"gap-1.5 text-xs font-medium\">\n                    <lucide-icon [img]=\"Download\" class=\"size-3.5\" />\n                    Download Disposition PDF\n                  </button>\n                </div>\n              </div>\n            </div>\n          </div>\n        </div>\n      } @else {\n        <!-- ACTIVE INSPECTION WORKBENCH VIEW -->\n        <div class=\"space-y-6\">\n          <!-- Top Station Header Card -->\n          <div ui-card class=\"border-border shadow-xs\">\n            <div ui-card-header class=\"pb-4\">\n              <div class=\"flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between\">\n                <div class=\"space-y-2\">\n                  <div class=\"flex flex-wrap items-center gap-2\">\n                    <span\n                      ui-badge\n                      variant=\"outline\"\n                      class=\"border-primary/30 bg-primary/10 text-primary gap-1.5 py-0.5 text-xs\"\n                    >\n                      <lucide-icon [img]=\"Warehouse\" class=\"size-3.5\" />\n                      Station #02 · Returns Intake & Grading\n                    </span>\n                    <span ui-badge variant=\"outline\" class=\"gap-1.5 py-0.5 font-mono text-xs\">\n                      <lucide-icon [img]=\"Tag\" class=\"size-3\" />\n                      {{ rmaNumber() }}\n                    </span>\n                    <span\n                      ui-badge\n                      variant=\"outline\"\n                      class=\"border-success/30 bg-success/10 text-success gap-1.5 py-0.5 text-xs\"\n                    >\n                      <lucide-icon [img]=\"Radio\" class=\"text-success size-3\" />\n                      Scanner Online\n                    </span>\n                  </div>\n\n                  <div>\n                    <h3 ui-card-title class=\"text-xl font-bold tracking-tight sm:text-2xl\">\n                      Warehouse Returns Intake & Grading Station #02\n                    </h3>\n                    <p ui-card-description class=\"text-xs sm:text-sm\">\n                      RMA intake verification, physical condition evaluation, restock/quarantine disposition routing,\n                      and customer refund action.\n                    </p>\n                  </div>\n                </div>\n\n                <!-- Primary Header CTA -->\n                <div class=\"flex shrink-0 items-center gap-2\">\n                  <button\n                    ui-button\n                    type=\"button\"\n                    size=\"default\"\n                    class=\"gap-2 text-xs font-semibold sm:text-sm\"\n                    (click)=\"handleCompleteInspection()\"\n                  >\n                    <lucide-icon [img]=\"FileCheck\" class=\"size-4\" />\n                    Complete Inspection & Disposition\n                  </button>\n                </div>\n              </div>\n            </div>\n\n            <!-- Metadata Ribbon Bar -->\n            <div ui-card-content class=\"pt-0 pb-4\">\n              <div class=\"border-border bg-muted/20 grid gap-3 rounded-lg border p-3.5 sm:grid-cols-2 lg:grid-cols-4\">\n                <div class=\"space-y-0.5\">\n                  <div class=\"text-muted-foreground flex items-center gap-1.5 text-xs font-medium\">\n                    <lucide-icon [img]=\"Tag\" class=\"text-primary size-3.5\" />\n                    <span>RMA Reference</span>\n                  </div>\n                  <p class=\"text-foreground font-mono text-xs font-semibold\">{{ rmaNumber() }}</p>\n                  <p class=\"text-muted-foreground text-xs\">Order: {{ item.orderRef }}</p>\n                </div>\n\n                <div class=\"space-y-0.5\">\n                  <div class=\"text-muted-foreground flex items-center gap-1.5 text-xs font-medium\">\n                    <lucide-icon [img]=\"UserCheck\" class=\"text-primary size-3.5\" />\n                    <span>Inspector / Station</span>\n                  </div>\n                  <p class=\"text-foreground text-xs font-semibold\">{{ inspectorName }}</p>\n                  <p class=\"text-muted-foreground text-xs\">Terminal Station #02</p>\n                </div>\n\n                <div class=\"space-y-0.5\">\n                  <div class=\"text-muted-foreground flex items-center gap-1.5 text-xs font-medium\">\n                    <lucide-icon [img]=\"CornerDownLeft\" class=\"text-primary size-3.5\" />\n                    <span>Customer Return Reason</span>\n                  </div>\n                  <p class=\"text-foreground truncate text-xs font-semibold\">{{ item.returnReason }}</p>\n                  <p class=\"text-muted-foreground text-xs\">Carrier: {{ item.carrier }}</p>\n                </div>\n\n                <div class=\"space-y-0.5\">\n                  <div class=\"text-muted-foreground flex items-center gap-1.5 text-xs font-medium\">\n                    <lucide-icon [img]=\"Clock\" class=\"text-primary size-3.5\" />\n                    <span>Intake Status</span>\n                  </div>\n                  <p class=\"text-foreground text-xs font-semibold\">In Progress · Pending Disposition</p>\n                  <p class=\"text-muted-foreground font-mono text-xs\">{{ item.trackingNumber }}</p>\n                </div>\n              </div>\n            </div>\n          </div>\n\n          <!-- 2-COLUMN INSPECTION WORKBENCH -->\n          <div class=\"grid grid-cols-1 items-start gap-6 lg:grid-cols-12\">\n            <!-- LEFT COLUMN: Item Verification & Condition Grading (7 Cols) -->\n            <div class=\"space-y-6 lg:col-span-7\">\n              <!-- 1. Scanned Item Verification Card -->\n              <div ui-card class=\"border-border shadow-xs\">\n                <div ui-card-header class=\"pb-3\">\n                  <div class=\"flex items-center justify-between\">\n                    <div class=\"flex flex-wrap items-center gap-2\">\n                      <lucide-icon [img]=\"ScanLine\" class=\"text-primary size-4\" />\n                      <h3 ui-card-title class=\"text-sm font-semibold\">Intake Item Scanned</h3>\n                    </div>\n                    <span ui-badge variant=\"outline\" class=\"border-success/30 bg-success/10 text-success gap-1 text-xs\">\n                      <lucide-icon [img]=\"CheckCircle2\" class=\"size-3\" />\n                      Match Verified\n                    </span>\n                  </div>\n                </div>\n\n                <div ui-card-content class=\"space-y-4\">\n                  <div\n                    class=\"border-border bg-card flex flex-col gap-3 rounded-lg border p-3.5 sm:flex-row sm:items-center\"\n                  >\n                    <div\n                      class=\"border-border bg-muted/60 text-muted-foreground flex size-14 shrink-0 items-center justify-center rounded-lg border\"\n                    >\n                      <lucide-icon [img]=\"Package\" class=\"text-primary size-7\" />\n                    </div>\n\n                    <div class=\"min-w-0 flex-1 space-y-1\">\n                      <div class=\"flex flex-wrap items-start justify-between gap-2\">\n                        <div>\n                          <h4 class=\"text-foreground text-sm leading-tight font-semibold\">\n                            {{ item.name }}\n                          </h4>\n                          <p class=\"text-muted-foreground text-xs\">\n                            {{ item.variant }} · SKU: <span class=\"font-mono font-medium\">{{ item.sku }}</span>\n                          </p>\n                        </div>\n                        <div class=\"text-right\">\n                          <span class=\"text-foreground text-base font-bold tabular-nums\">\n                            {{ formatCurrency(item.msrp) }}\n                          </span>\n                          <span class=\"text-muted-foreground block text-xs\">MSRP</span>\n                        </div>\n                      </div>\n\n                      <div class=\"flex flex-wrap items-center gap-3 pt-1 text-xs\">\n                        <div class=\"text-muted-foreground flex items-center gap-1.5 font-mono\">\n                          <lucide-icon [img]=\"Barcode\" class=\"text-success size-3.5\" />\n                          <span class=\"text-foreground font-semibold\">{{ item.upc }}</span>\n                          <span ui-badge variant=\"outline\" class=\"text-success h-4 px-1.5 py-0 text-xs\">UPC OK</span>\n                        </div>\n                        <ui-separator orientation=\"vertical\" class=\"h-3.5\" />\n                        <span class=\"text-muted-foreground\">Order: {{ item.orderRef }}</span>\n                      </div>\n                    </div>\n                  </div>\n                </div>\n              </div>\n\n              <!-- 2. Condition Grading Radio Cards -->\n              <div ui-card class=\"border-border shadow-xs\">\n                <div ui-card-header class=\"pb-3\">\n                  <div class=\"flex items-center justify-between\">\n                    <div class=\"space-y-0.5\">\n                      <h3 ui-card-title class=\"text-sm font-semibold\">Condition Grading Assessment</h3>\n                      <p ui-card-description class=\"text-xs\">\n                        Select physical grading level to trigger automated warehouse routing rules.\n                      </p>\n                    </div>\n                    <span ui-badge [class]=\"currentGrade().badgeClasses\">\n                      {{ currentGrade().code }}\n                    </span>\n                  </div>\n                </div>\n\n                <div ui-card-content>\n                  <ui-radio-group\n                    [value]=\"selectedGrade()\"\n                    (valueChange)=\"setGrade($event)\"\n                    class=\"grid grid-cols-1 gap-2.5\"\n                  >\n                    <!-- Grade A -->\n                    <div [class]=\"gradeCardClass('grade-a')\" (click)=\"selectedGrade.set('grade-a')\">\n                      <ui-radio-group-item id=\"grade-a\" value=\"grade-a\" class=\"mt-0.5\" />\n                      <div class=\"flex-1 space-y-1\">\n                        <div class=\"flex flex-wrap items-center justify-between gap-2\">\n                          <label for=\"grade-a\" class=\"text-foreground cursor-pointer text-xs font-semibold sm:text-sm\">\n                            Grade A: Brand New / Unopened\n                          </label>\n                          <span ui-badge variant=\"outline\" class=\"border-success/30 bg-success/10 text-success text-xs\">\n                            Primary Restock\n                          </span>\n                        </div>\n                        <p class=\"text-muted-foreground text-xs leading-relaxed\">\n                          Original factory tags & packaging intact. No cosmetic or functional flaws.\n                        </p>\n                        <div class=\"text-muted-foreground flex items-center gap-1.5 pt-1 text-xs\">\n                          <lucide-icon [img]=\"ArrowRight\" class=\"text-primary size-3\" />\n                          <span\n                            >Target:\n                            <strong class=\"text-foreground font-medium\"\n                              >Restock to Primary Inventory (Aisle 04-B)</strong\n                            ></span\n                          >\n                        </div>\n                      </div>\n                    </div>\n\n                    <!-- Grade B -->\n                    <div [class]=\"gradeCardClass('grade-b')\" (click)=\"selectedGrade.set('grade-b')\">\n                      <ui-radio-group-item id=\"grade-b\" value=\"grade-b\" class=\"mt-0.5\" />\n                      <div class=\"flex-1 space-y-1\">\n                        <div class=\"flex flex-wrap items-center justify-between gap-2\">\n                          <label for=\"grade-b\" class=\"text-foreground cursor-pointer text-xs font-semibold sm:text-sm\">\n                            Grade B: Open Box / Minor Cosmetic\n                          </label>\n                          <span ui-badge variant=\"outline\" class=\"border-warning/30 bg-warning/10 text-warning text-xs\">\n                            Outlet Store\n                          </span>\n                        </div>\n                        <p class=\"text-muted-foreground text-xs leading-relaxed\">\n                          Box opened or minor package scuffs, but product is 100% unworn and fully functional.\n                        </p>\n                        <div class=\"text-muted-foreground flex items-center gap-1.5 pt-1 text-xs\">\n                          <lucide-icon [img]=\"ArrowRight\" class=\"text-primary size-3\" />\n                          <span\n                            >Target:\n                            <strong class=\"text-foreground font-medium\"\n                              >Route to Outlet / Refurbished Store</strong\n                            ></span\n                          >\n                        </div>\n                      </div>\n                    </div>\n\n                    <!-- Grade C -->\n                    <div [class]=\"gradeCardClass('grade-c')\" (click)=\"selectedGrade.set('grade-c')\">\n                      <ui-radio-group-item id=\"grade-c\" value=\"grade-c\" class=\"mt-0.5\" />\n                      <div class=\"flex-1 space-y-1\">\n                        <div class=\"flex flex-wrap items-center justify-between gap-2\">\n                          <label for=\"grade-c\" class=\"text-foreground cursor-pointer text-xs font-semibold sm:text-sm\">\n                            Grade C: Worn / Used\n                          </label>\n                          <span\n                            ui-badge\n                            variant=\"outline\"\n                            class=\"border-orange-500/30 bg-orange-500/10 text-xs text-orange-700 dark:text-orange-400\"\n                          >\n                            Liquidation\n                          </span>\n                        </div>\n                        <p class=\"text-muted-foreground text-xs leading-relaxed\">\n                          Visible wear on soles, minor creasing or cosmetic stains. Not suitable for retail shelves.\n                        </p>\n                        <div class=\"text-muted-foreground flex items-center gap-1.5 pt-1 text-xs\">\n                          <lucide-icon [img]=\"ArrowRight\" class=\"text-primary size-3\" />\n                          <span\n                            >Target:\n                            <strong class=\"text-foreground font-medium\"\n                              >Liquidation Batch #LQ-409 (Wholesale Lot)</strong\n                            ></span\n                          >\n                        </div>\n                      </div>\n                    </div>\n\n                    <!-- Grade D -->\n                    <div [class]=\"gradeCardClass('grade-d')\" (click)=\"selectedGrade.set('grade-d')\">\n                      <ui-radio-group-item id=\"grade-d\" value=\"grade-d\" class=\"mt-0.5\" />\n                      <div class=\"flex-1 space-y-1\">\n                        <div class=\"flex flex-wrap items-center justify-between gap-2\">\n                          <label for=\"grade-d\" class=\"text-foreground cursor-pointer text-xs font-semibold sm:text-sm\">\n                            Grade D: Damaged / Defective\n                          </label>\n                          <span ui-badge variant=\"destructive\" class=\"text-xs\">Quarantine RTV</span>\n                        </div>\n                        <p class=\"text-muted-foreground text-xs leading-relaxed\">\n                          Torn fabric, broken seam, outsole separation, or manufacturing defect.\n                        </p>\n                        <div class=\"text-muted-foreground flex items-center gap-1.5 pt-1 text-xs\">\n                          <lucide-icon [img]=\"ArrowRight\" class=\"text-primary size-3\" />\n                          <span\n                            >Target:\n                            <strong class=\"text-foreground font-medium\"\n                              >Quarantine Bay Q-08 / Return to Vendor (RTV)</strong\n                            ></span\n                          >\n                        </div>\n                      </div>\n                    </div>\n                  </ui-radio-group>\n                </div>\n              </div>\n\n              <!-- 3. Physical Inspection Checklist -->\n              <div ui-card class=\"border-border shadow-xs\">\n                <div ui-card-header class=\"pb-3\">\n                  <div class=\"flex items-center justify-between\">\n                    <div class=\"space-y-0.5\">\n                      <h3 ui-card-title class=\"text-sm font-semibold\">Physical Inspection Checklist</h3>\n                      <p ui-card-description class=\"text-xs\">\n                        Verify all physical criteria before approving final warehouse putaway.\n                      </p>\n                    </div>\n                    <div class=\"flex flex-wrap items-center gap-2\">\n                      <span ui-badge variant=\"secondary\" class=\"font-mono text-xs\">\n                        {{ checkedChecklistCount() }}/{{ totalChecklistCount }} Passed\n                      </span>\n                      <button\n                        ui-button\n                        type=\"button\"\n                        variant=\"ghost\"\n                        size=\"sm\"\n                        class=\"text-muted-foreground hover:text-foreground h-7 text-xs\"\n                        (click)=\"selectAllChecklist(!allChecksPassed())\"\n                      >\n                        {{ allChecksPassed() ? 'Uncheck All' : 'Pass All' }}\n                      </button>\n                    </div>\n                  </div>\n                </div>\n\n                <div ui-card-content class=\"space-y-2.5\">\n                  <!-- Item 1: Tags Attached -->\n                  <div [class]=\"checkRowClass(checklist().tagsAttached)\">\n                    <ui-checkbox\n                      id=\"chk-tags\"\n                      [checked]=\"checklist().tagsAttached\"\n                      (checkedChange)=\"setCheck('tagsAttached', $event)\"\n                      class=\"mt-0.5\"\n                    />\n                    <div class=\"flex-1 space-y-0.5\">\n                      <label for=\"chk-tags\" class=\"text-foreground cursor-pointer text-xs font-semibold select-none\">\n                        Tags attached\n                      </label>\n                      <p class=\"text-muted-foreground text-xs\">\n                        Factory hangtags, barcode UPC stickers, and care labels intact.\n                      </p>\n                    </div>\n                  </div>\n\n                  <!-- Item 2: Original Box Present -->\n                  <div [class]=\"checkRowClass(checklist().originalBox)\">\n                    <ui-checkbox\n                      id=\"chk-box\"\n                      [checked]=\"checklist().originalBox\"\n                      (checkedChange)=\"setCheck('originalBox', $event)\"\n                      class=\"mt-0.5\"\n                    />\n                    <div class=\"flex-1 space-y-0.5\">\n                      <label for=\"chk-box\" class=\"text-foreground cursor-pointer text-xs font-semibold select-none\">\n                        Original box present\n                      </label>\n                      <p class=\"text-muted-foreground text-xs\">\n                        Manufacturer shoebox present with readable SKU and size label.\n                      </p>\n                    </div>\n                  </div>\n\n                  <!-- Item 3: Accessories in Box -->\n                  <div [class]=\"checkRowClass(checklist().allAccessories)\">\n                    <ui-checkbox\n                      id=\"chk-acc\"\n                      [checked]=\"checklist().allAccessories\"\n                      (checkedChange)=\"setCheck('allAccessories', $event)\"\n                      class=\"mt-0.5\"\n                    />\n                    <div class=\"flex-1 space-y-0.5\">\n                      <label for=\"chk-acc\" class=\"text-foreground cursor-pointer text-xs font-semibold select-none\">\n                        All accessories in box\n                      </label>\n                      <p class=\"text-muted-foreground text-xs\">\n                        Extra pair of laces, dust bag, and product manual verified.\n                      </p>\n                    </div>\n                  </div>\n\n                  <!-- Item 4: Odor and Stain Free -->\n                  <div [class]=\"checkRowClass(checklist().odorStainFree)\">\n                    <ui-checkbox\n                      id=\"chk-odor\"\n                      [checked]=\"checklist().odorStainFree\"\n                      (checkedChange)=\"setCheck('odorStainFree', $event)\"\n                      class=\"mt-0.5\"\n                    />\n                    <div class=\"flex-1 space-y-0.5\">\n                      <label for=\"chk-odor\" class=\"text-foreground cursor-pointer text-xs font-semibold select-none\">\n                        Odor & stain free\n                      </label>\n                      <p class=\"text-muted-foreground text-xs\">\n                        Free from perfume scent, tobacco smoke, pet hair, dirt, or cosmetic scuffs.\n                      </p>\n                    </div>\n                  </div>\n                </div>\n              </div>\n            </div>\n\n            <!-- RIGHT COLUMN: Disposition & Customer Refund Action Card (5 Cols) -->\n            <div class=\"space-y-6 lg:col-span-5\">\n              <!-- 1. Selected Automated Warehouse Disposition Card -->\n              <div ui-card class=\"border-border overflow-hidden shadow-xs\">\n                <div ui-card-header class=\"bg-muted/15 border-border border-b pb-3\">\n                  <div class=\"flex items-center justify-between\">\n                    <div class=\"flex flex-wrap items-center gap-2\">\n                      <lucide-icon [img]=\"Warehouse\" class=\"text-primary size-4\" />\n                      <h3 ui-card-title class=\"text-sm font-semibold\">Warehouse Routing Outcome</h3>\n                    </div>\n                    <span ui-badge [class]=\"currentGrade().badgeClasses\">\n                      {{ currentGrade().code }}\n                    </span>\n                  </div>\n                </div>\n\n                <div ui-card-content class=\"space-y-4 p-4\">\n                  <!-- Active Outcome Card Banner -->\n                  <div [class]=\"outcomeBannerClass\">\n                    <div class=\"flex items-start gap-3\">\n                      <div\n                        class=\"border-border bg-background/80 text-foreground flex size-9 shrink-0 items-center justify-center rounded-md border\"\n                      >\n                        <lucide-icon [img]=\"Box\" class=\"text-primary size-5\" />\n                      </div>\n                      <div class=\"min-w-0 flex-1 space-y-1\">\n                        <div class=\"flex flex-wrap items-center gap-2\">\n                          <span class=\"text-foreground text-xs font-bold sm:text-sm\">\n                            {{ currentGrade().route }}\n                          </span>\n                        </div>\n                        <p class=\"text-muted-foreground text-xs\">\n                          Destination Bin:\n                          <strong class=\"text-foreground font-mono font-semibold\">{{\n                            currentGrade().targetBin\n                          }}</strong>\n                        </p>\n                        <p class=\"text-muted-foreground text-xs\">\n                          Priority: <span class=\"text-foreground font-medium\">{{ currentGrade().priority }}</span>\n                        </p>\n                      </div>\n                    </div>\n\n                    <div class=\"border-border/60 mt-3.5 flex items-center justify-between border-t pt-3 text-xs\">\n                      <span class=\"text-muted-foreground font-mono\">LPN: {{ currentGrade().lpnCode }}</span>\n                      <span ui-badge variant=\"outline\" class=\"font-mono text-xs\">READY FOR SCAN</span>\n                    </div>\n                  </div>\n                </div>\n              </div>\n\n              <!-- 2. Customer Refund Action Card -->\n              <div ui-card class=\"border-border shadow-xs\">\n                <div ui-card-header class=\"pb-3\">\n                  <div class=\"flex items-center justify-between\">\n                    <div class=\"space-y-0.5\">\n                      <h3 ui-card-title class=\"text-sm font-semibold\">Customer Refund Action</h3>\n                      <p ui-card-description class=\"text-xs\">Choose financial settlement for RMA {{ rmaNumber() }}.</p>\n                    </div>\n                    <lucide-icon [img]=\"CreditCard\" class=\"text-muted-foreground size-4\" />\n                  </div>\n                </div>\n\n                <div ui-card-content class=\"space-y-4\">\n                  <ui-radio-group\n                    [value]=\"selectedRefundAction()\"\n                    (valueChange)=\"setRefundAction($event)\"\n                    class=\"grid grid-cols-1 gap-2.5\"\n                  >\n                    <!-- Option 1: Full Refund -->\n                    <div [class]=\"refundCardClass('full-refund')\" (click)=\"selectedRefundAction.set('full-refund')\">\n                      <ui-radio-group-item id=\"ref-full\" value=\"full-refund\" class=\"mt-0.5\" />\n                      <div class=\"flex-1 space-y-0.5\">\n                        <div class=\"flex items-center justify-between\">\n                          <label for=\"ref-full\" class=\"text-foreground cursor-pointer text-xs font-semibold\">\n                            Authorize Full Refund\n                          </label>\n                          <span class=\"text-foreground text-xs font-semibold tabular-nums\">\n                            {{ formatCurrency(item.msrp) }}\n                          </span>\n                        </div>\n                        <p class=\"text-muted-foreground text-xs\">\n                          100% refund to <span class=\"text-foreground font-medium\">Visa •••• 4242</span>. 3–5 business\n                          days.\n                        </p>\n                      </div>\n                    </div>\n\n                    <!-- Option 2: Store Credit (+10% Bonus) -->\n                    <div [class]=\"refundCardClass('store-credit')\" (click)=\"selectedRefundAction.set('store-credit')\">\n                      <ui-radio-group-item id=\"ref-credit\" value=\"store-credit\" class=\"mt-0.5\" />\n                      <div class=\"flex-1 space-y-0.5\">\n                        <div class=\"flex items-center justify-between\">\n                          <div class=\"flex items-center gap-1.5\">\n                            <lucide-icon [img]=\"Gift\" class=\"text-success size-3\" />\n                            <label for=\"ref-credit\" class=\"text-foreground cursor-pointer text-xs font-semibold\">\n                              Issue Store Credit (+10%)\n                            </label>\n                          </div>\n                          <span class=\"text-success text-success text-xs font-semibold tabular-nums\">\n                            {{ formatCurrency(item.msrp * 1.1) }}\n                          </span>\n                        </div>\n                        <p class=\"text-muted-foreground text-xs\">\n                          Includes\n                          <span class=\"text-foreground font-medium\">+{{ formatCurrency(item.msrp * 0.1) }}</span> bonus\n                          credit. Delivered instantly by email.\n                        </p>\n                      </div>\n                    </div>\n\n                    <!-- Option 3: Charge Restocking Fee -->\n                    <div [class]=\"refundCardClass('restock-fee')\" (click)=\"selectedRefundAction.set('restock-fee')\">\n                      <ui-radio-group-item id=\"ref-fee\" value=\"restock-fee\" class=\"mt-0.5\" />\n                      <div class=\"flex-1 space-y-0.5\">\n                        <div class=\"flex items-center justify-between\">\n                          <label for=\"ref-fee\" class=\"text-foreground cursor-pointer text-xs font-semibold\">\n                            Charge Restocking Fee (-$15)\n                          </label>\n                          <span class=\"text-foreground text-xs font-semibold tabular-nums\">\n                            {{ formatCurrency(item.msrp - 15) }}\n                          </span>\n                        </div>\n                        <p class=\"text-muted-foreground text-xs\">\n                          $15.00 repackaging & inspection deduction. Net to\n                          <span class=\"text-foreground font-medium\">Visa •••• 4242</span>.\n                        </p>\n                      </div>\n                    </div>\n                  </ui-radio-group>\n\n                  <!-- Settlement Calculation Summary Box -->\n                  <div class=\"border-border bg-muted/30 space-y-1.5 rounded-lg border p-3 text-xs\">\n                    <div class=\"text-muted-foreground flex items-center justify-between\">\n                      <span>Item MSRP</span>\n                      <span class=\"text-foreground font-mono font-medium\">{{\n                        formatCurrency(refundCalculations().subtotal)\n                      }}</span>\n                    </div>\n                    @if (selectedRefundAction() === 'store-credit') {\n                      <div class=\"text-success flex items-center justify-between\">\n                        <span>{{ refundCalculations().adjustmentLabel }}</span>\n                        <span class=\"font-mono font-medium\"\n                          >+{{ formatCurrency(refundCalculations().adjustmentAmount) }}</span\n                        >\n                      </div>\n                    } @else if (selectedRefundAction() === 'restock-fee') {\n                      <div class=\"text-destructive flex items-center justify-between\">\n                        <span>{{ refundCalculations().adjustmentLabel }}</span>\n                        <span class=\"font-mono font-medium\"\n                          >-{{ formatCurrency(refundCalculations().adjustmentAmount) }}</span\n                        >\n                      </div>\n                    }\n                    <div\n                      class=\"border-border text-foreground flex items-center justify-between border-t pt-1.5 font-bold\"\n                    >\n                      <span>Authorized Net Settlement</span>\n                      <span\n                        class=\"font-mono text-sm font-bold tabular-nums\"\n                        [class.text-success]=\"selectedRefundAction() === 'store-credit'\"\n                      >\n                        {{ formatCurrency(refundCalculations().totalRefund) }}\n                      </span>\n                    </div>\n                  </div>\n                </div>\n              </div>\n\n              <!-- 3. Internal QC Inspection Notes -->\n              <div ui-card class=\"border-border shadow-xs\">\n                <div ui-card-header class=\"pb-3\">\n                  <div class=\"flex items-center justify-between\">\n                    <div class=\"space-y-0.5\">\n                      <h3 ui-card-title class=\"text-sm font-semibold\">Internal QC Inspection Notes</h3>\n                      <p ui-card-description class=\"text-xs\">Station audit log appended to inventory history.</p>\n                    </div>\n                  </div>\n                </div>\n\n                <div ui-card-content class=\"space-y-3\">\n                  <ui-textarea\n                    [value]=\"qcNotes()\"\n                    (valueChange)=\"qcNotes.set($event)\"\n                    [rows]=\"3\"\n                    placeholder=\"Enter internal inspection notes, physical defect description, or warehouse packaging details...\"\n                    class=\"text-xs\"\n                  />\n\n                  <!-- Quick Tag Helpers -->\n                  <div class=\"space-y-1.5\">\n                    <span class=\"text-muted-foreground block text-xs font-medium\">Quick Preset Tags:</span>\n                    <div class=\"flex flex-wrap gap-1.5\">\n                      <button\n                        type=\"button\"\n                        class=\"border-border bg-muted/40 hover:bg-muted text-muted-foreground hover:text-foreground min-h-6 cursor-pointer rounded-md border px-2 py-0.5 text-xs transition-colors\"\n                        (click)=\"applyPresetNote('Pristine unworn condition.')\"\n                      >\n                        + Pristine Condition\n                      </button>\n                      <button\n                        type=\"button\"\n                        class=\"border-border bg-muted/40 hover:bg-muted text-muted-foreground hover:text-foreground min-h-6 cursor-pointer rounded-md border px-2 py-0.5 text-xs transition-colors\"\n                        (click)=\"applyPresetNote('Minor outer box scuff; shoes mint.')\"\n                      >\n                        + Box Scuffed\n                      </button>\n                      <button\n                        type=\"button\"\n                        class=\"border-border bg-muted/40 hover:bg-muted text-muted-foreground hover:text-foreground min-h-6 cursor-pointer rounded-md border px-2 py-0.5 text-xs transition-colors\"\n                        (click)=\"applyPresetNote('Slight sole friction detected.')\"\n                      >\n                        + Sole Friction\n                      </button>\n                      <button\n                        type=\"button\"\n                        class=\"border-border bg-muted/40 hover:bg-muted text-muted-foreground hover:text-foreground min-h-6 cursor-pointer rounded-md border px-2 py-0.5 text-xs transition-colors\"\n                        (click)=\"applyPresetNote('Factory seam defect identified - Flagged RTV.')\"\n                      >\n                        + Flagged RTV\n                      </button>\n                    </div>\n                  </div>\n                </div>\n\n                <div ui-card-footer class=\"border-border bg-muted/15 flex items-center justify-between border-t p-4\">\n                  <span class=\"text-muted-foreground text-xs\">\n                    Audit sign-off: <strong class=\"text-foreground font-medium\">{{ inspectorName }}</strong>\n                  </span>\n                  <button\n                    ui-button\n                    size=\"sm\"\n                    class=\"gap-1.5 text-xs font-semibold\"\n                    (click)=\"handleCompleteInspection()\"\n                  >\n                    <lucide-icon [img]=\"FileCheck\" class=\"size-3.5\" />\n                    Complete Inspection\n                  </button>\n                </div>\n              </div>\n            </div>\n          </div>\n        </div>\n      }\n    </div>\n  `,\n})\nexport class UiReturnMerchandiseInspectionComponent {\n  protected readonly AlertTriangle = AlertTriangle\n  protected readonly ArrowRight = ArrowRight\n  protected readonly Barcode = Barcode\n  protected readonly Box = Box\n  protected readonly CheckCircle2 = CheckCircle2\n  protected readonly Clock = Clock\n  protected readonly CornerDownLeft = CornerDownLeft\n  protected readonly CreditCard = CreditCard\n  protected readonly Download = Download\n  protected readonly FileCheck = FileCheck\n  protected readonly Gift = Gift\n  protected readonly Package = Package\n  protected readonly PackageCheck = PackageCheck\n  protected readonly Printer = Printer\n  protected readonly Radio = Radio\n  protected readonly RotateCcw = RotateCcw\n  protected readonly ScanLine = ScanLine\n  protected readonly Tag = Tag\n  protected readonly UserCheck = UserCheck\n  protected readonly Warehouse = Warehouse\n\n  protected readonly item = itemData\n  protected readonly totalChecklistCount = 4\n\n  @Input() set initialRma(v: string | undefined) {\n    if (v !== undefined) this.rmaNumber.set(v)\n  }\n  @Input() set initialGrade(v: ConditionGrade | undefined) {\n    if (v !== undefined) this.selectedGrade.set(v)\n  }\n  @Input() set initialRefundAction(v: RefundAction | undefined) {\n    if (v !== undefined) this.selectedRefundAction.set(v)\n  }\n  @Input() set initialSubmitted(v: boolean | undefined) {\n    if (v !== undefined) this.submitted.set(!!v)\n  }\n  @Input() inspectorName = 'Alex Rivera · QC Lead'\n  @Input() stationName = 'Warehouse Returns Intake & Grading Station #02'\n  @Input('class') className?: string\n  @Output() complete = new EventEmitter<ReturnInspectionData>()\n\n  readonly rmaNumber = signal('#RMA-849201')\n  readonly selectedGrade = signal<ConditionGrade>('grade-a')\n  readonly selectedRefundAction = signal<RefundAction>('full-refund')\n  readonly submitted = signal(false)\n  readonly qcNotes = signal(defaultQcNotes)\n  readonly checklist = signal<InspectionChecklist>({\n    tagsAttached: true,\n    originalBox: true,\n    allAccessories: true,\n    odorStainFree: true,\n  })\n\n  readonly currentGrade = computed(() => gradeDefinitions[this.selectedGrade()])\n\n  readonly checkedChecklistCount = computed(() => {\n    const c = this.checklist()\n    return [c.tagsAttached, c.originalBox, c.allAccessories, c.odorStainFree].filter(Boolean).length\n  })\n\n  readonly allChecksPassed = computed(() => this.checkedChecklistCount() === this.totalChecklistCount)\n\n  readonly refundCalculations = computed(() => {\n    const msrp = itemData.msrp\n    if (this.selectedRefundAction() === 'store-credit') {\n      const bonus = msrp * 0.1\n      return {\n        subtotal: msrp,\n        adjustmentLabel: 'Store Credit Bonus (+10%)',\n        adjustmentAmount: bonus,\n        isBonus: true,\n        totalRefund: msrp + bonus,\n        methodLabel: 'Digital Gift Card (sarah.c@example.com)',\n        payoutSpeed: 'Instant email delivery upon grading',\n      }\n    }\n\n    if (this.selectedRefundAction() === 'restock-fee') {\n      const fee = 15.0\n      return {\n        subtotal: msrp,\n        adjustmentLabel: 'Restocking & Repacking Fee',\n        adjustmentAmount: fee,\n        isBonus: false,\n        totalRefund: msrp - fee,\n        methodLabel: 'Net Credit to Visa •••• 4242',\n        payoutSpeed: '3–5 business days to card',\n      }\n    }\n\n    return {\n      subtotal: msrp,\n      adjustmentLabel: 'Restocking Fee Waived',\n      adjustmentAmount: 0,\n      isBonus: false,\n      totalRefund: msrp,\n      methodLabel: 'Full Refund to Visa •••• 4242',\n      payoutSpeed: '3–5 business days to card',\n    }\n  })\n\n  get rootClass(): string {\n    return cn('text-foreground mx-auto w-full max-w-6xl space-y-6', this.className)\n  }\n\n  get receiptBannerClass(): string {\n    return cn(\n      'border-b p-6 text-center sm:p-8',\n      this.selectedGrade() === 'grade-d'\n        ? 'border-destructive/30 bg-destructive/10'\n        : 'border-success/30 bg-success/10',\n    )\n  }\n\n  get receiptGlowClass(): string {\n    return cn(\n      'absolute inset-0 rounded-full blur-xl',\n      this.selectedGrade() === 'grade-d' ? 'bg-destructive/30' : 'bg-success/30',\n    )\n  }\n\n  get receiptIconWrapClass(): string {\n    return cn(\n      'relative flex size-16 items-center justify-center rounded-full border shadow-xs',\n      this.selectedGrade() === 'grade-d'\n        ? 'border-destructive/40 bg-destructive/20 text-destructive'\n        : 'border-success/40 bg-success/20 text-success',\n    )\n  }\n\n  get receiptBadgeClass(): string {\n    return cn(\n      'mb-2 font-mono text-xs tracking-wider uppercase',\n      this.selectedGrade() !== 'grade-d' && 'border-success/30 bg-success/10 text-success',\n    )\n  }\n\n  get outcomeBannerClass(): string {\n    return cn('rounded-lg border p-4 transition-colors', this.currentGrade().activeBorderBg)\n  }\n\n  gradeCardClass(grade: ConditionGrade): string {\n    return cn(\n      'flex cursor-pointer items-start gap-3 rounded-lg border p-3.5 transition-colors select-none',\n      this.selectedGrade() === grade\n        ? gradeDefinitions[grade].activeBorderBg\n        : 'border-border bg-card hover:bg-muted/30',\n    )\n  }\n\n  refundCardClass(action: RefundAction): string {\n    const active =\n      action === 'store-credit'\n        ? 'border-success/50 bg-success/5 ring-success/20 dark:bg-success/10 shadow-xs ring-1'\n        : 'border-primary bg-primary/[0.03] dark:bg-primary/10 shadow-xs'\n    return cn(\n      'flex cursor-pointer items-start gap-3 rounded-lg border p-3 transition-colors select-none',\n      this.selectedRefundAction() === action ? active : 'border-border bg-card hover:bg-muted/30',\n    )\n  }\n\n  checkRowClass(passed: boolean): string {\n    return cn(\n      'flex items-start gap-3 rounded-lg border p-3 transition-colors',\n      passed ? 'border-border bg-card' : 'border-warning/30 bg-warning/5',\n    )\n  }\n\n  setGrade(value: string): void {\n    this.selectedGrade.set(value as ConditionGrade)\n  }\n\n  setRefundAction(value: string): void {\n    this.selectedRefundAction.set(value as RefundAction)\n  }\n\n  setCheck(key: keyof InspectionChecklist, value: CheckedState): void {\n    const checked = value === true\n    this.checklist.update((prev) => ({ ...prev, [key]: checked }))\n  }\n\n  formatCurrency(val: number): string {\n    return new Intl.NumberFormat('en-US', {\n      style: 'currency',\n      currency: 'USD',\n      minimumFractionDigits: 2,\n    }).format(val)\n  }\n\n  selectAllChecklist(pass: boolean): void {\n    this.checklist.set({ tagsAttached: pass, originalBox: pass, allAccessories: pass, odorStainFree: pass })\n  }\n\n  applyPresetNote(note: string): void {\n    const current = this.qcNotes()\n    if (!current.includes(note)) this.qcNotes.set(current ? `${current} ${note}` : note)\n  }\n\n  handleCompleteInspection(): void {\n    this.submitted.set(true)\n    const grade = this.currentGrade()\n    this.complete.emit({\n      rmaNumber: this.rmaNumber(),\n      stationId: 'STATION-02-B',\n      inspectorName: this.inspectorName,\n      returnReason: itemData.returnReason,\n      item: {\n        name: itemData.name,\n        variant: itemData.variant,\n        msrp: itemData.msrp,\n        sku: itemData.sku,\n        upc: itemData.upc,\n        verified: true,\n      },\n      grade: this.selectedGrade(),\n      checklist: { ...this.checklist() },\n      refundAction: this.selectedRefundAction(),\n      qcNotes: this.qcNotes(),\n      dispositionOutcome: {\n        route: grade.route,\n        destinationBin: grade.targetBin,\n        lpnCode: grade.lpnCode,\n        priority: grade.priority,\n      },\n    })\n  }\n\n  handleReset(): void {\n    this.submitted.set(false)\n    this.selectedGrade.set('grade-a')\n    this.selectedRefundAction.set('full-refund')\n    this.selectAllChecklist(true)\n    this.qcNotes.set(defaultQcNotes)\n  }\n}\n",
      "type": "registry:block",
      "target": "~/src/app/components/blocks/return-merchandise-inspection/return-merchandise-inspection.component.ts"
    },
    {
      "path": "packages/registry-angular/blocks/return-merchandise-inspection/index.ts",
      "content": "export {\n  UiReturnMerchandiseInspectionComponent,\n  type ConditionGrade,\n  type RefundAction,\n  type InspectionChecklist,\n  type ReturnInspectionData,\n} from './return-merchandise-inspection.component'\n",
      "type": "registry:block",
      "target": "~/src/app/components/blocks/return-merchandise-inspection/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/checkbox.json",
    "https://uipkge.dev/r/angular/radio-group.json",
    "https://uipkge.dev/r/angular/separator.json",
    "https://uipkge.dev/r/angular/textarea.json"
  ],
  "description": "Warehouse returns intake inspection station, RMA condition grading, and restock vs quarantine disposition workbench.",
  "categories": [
    "logistics",
    "ecommerce",
    "app"
  ]
}