{
  "$schema": "https://uipkge.dev/schema/registry-item.json",
  "name": "driver-inspection-checklist",
  "title": "Driver Inspection Checklist",
  "type": "registry:block",
  "files": [
    {
      "path": "packages/registry-angular/blocks/driver-inspection-checklist/driver-inspection-checklist.component.ts",
      "content": "// Commercial vehicle Driver Vehicle Inspection Report (DVIR) pre-trip and post-trip safety\n// audit. Features vehicle odometer & ELD telemetry header, 5 grouped FMCSA safety inspection\n// categories (Brakes & Air Pressure, Tires & Wheels, Lights & Electrical, Engine & Fluids,\n// Emergency Safety Gear) with Pass/Fail/N/A segmented controls, dynamic defect report card with\n// Out-of-Service severity classification, defect notes, photo dropzone, driver CDL certification\n// signature pad, and post-submission compliance receipt. Port of the React block 1:1.\nimport { ChangeDetectionStrategy, Component, EventEmitter, Input, Output, computed, signal } from '@angular/core'\nimport {\n  AlertCircle,\n  AlertTriangle,\n  Camera,\n  Check,\n  CheckCircle2,\n  Clock,\n  Disc,\n  Download,\n  FileCheck,\n  FileText,\n  Flame,\n  Gauge,\n  Layers,\n  Lightbulb,\n  LucideAngularModule,\n  Minus,\n  Printer,\n  RotateCcw,\n  ShieldAlert,\n  ShieldCheck,\n  Trash2,\n  Truck,\n  UploadCloud,\n  User,\n  Wrench,\n  X,\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 } from '@/ui/checkbox/checkbox.component'\nimport { UiInputComponent } from '@/ui/input/input.component'\nimport { UiLabelComponent } from '@/ui/label/label.component'\nimport {\n  UiSelectComponent,\n  UiSelectContentComponent,\n  UiSelectItemComponent,\n  UiSelectTriggerComponent,\n  UiSelectValueComponent,\n} from '@/ui/select/select.component'\nimport { UiSeparatorComponent } from '@/ui/separator/separator.component'\nimport { UiTextareaComponent } from '@/ui/textarea/textarea.component'\n\nexport type CheckStatus = 'pass' | 'fail' | 'na'\nexport type DefectSeverity = 'minor' | 'critical'\nexport type InspectionType = 'pre-trip' | 'post-trip' | 'intermodal'\n\nexport interface InspectionItem {\n  id: string\n  label: string\n  spec: string\n  status: CheckStatus\n  notes?: string\n}\n\nexport interface InspectionCategory {\n  id: string\n  title: string\n  description: string\n  icon: string\n  items: InspectionItem[]\n}\n\nexport interface DefectPhoto {\n  id: string\n  name: string\n  size: string\n  url?: string\n}\n\nexport interface DVIRReportData {\n  reportId: string\n  vehicleId: string\n  trailerId: string\n  odometer: string\n  inspectionType: InspectionType\n  driverName: string\n  driverCdl: string\n  carrierName: string\n  dotNumber: string\n  inspectionDate: string\n  inspectionTime: string\n  location: string\n  categories: InspectionCategory[]\n  defectSeverity: DefectSeverity\n  defectNotes: string\n  defectPhotos: DefectPhoto[]\n  certified: boolean\n  signatureTimestamp: string\n}\n\nconst DEFAULT_CATEGORIES: InspectionCategory[] = [\n  {\n    id: 'brakes',\n    title: '1. Brakes & Air Pressure',\n    description: 'FMCSA § 393.40 / 393.51 Air Brake System & Lines',\n    icon: 'disc',\n    items: [\n      {\n        id: 'brakes-service',\n        label: 'Service Brakes & Stopping Response',\n        spec: 'Smooth pedal feel, no pulling, stopping within 35 ft at 20 mph',\n        status: 'pass',\n      },\n      {\n        id: 'brakes-parking',\n        label: 'Parking Brake Mechanism',\n        spec: 'Holds fully loaded vehicle against low gear engine torque',\n        status: 'pass',\n      },\n      {\n        id: 'brakes-airlines',\n        label: 'Air Lines & System Pressure (120 PSI)',\n        spec: 'Maintains 120 PSI operating pressure; gladhand seals leak-free',\n        status: 'pass',\n      },\n      {\n        id: 'brakes-drums',\n        label: 'Brake Drums, Linings & Slack Adjusters',\n        spec: 'Lining thickness > 1/4\", no oil/grease contamination on drums',\n        status: 'pass',\n      },\n    ],\n  },\n  {\n    id: 'tires',\n    title: '2. Tires, Wheels & Rims',\n    description: 'FMCSA § 393.75 Wheel Assemblies & Tread Integrity',\n    icon: 'layers',\n    items: [\n      {\n        id: 'tires-tread',\n        label: 'Steer & Drive Tire Tread Depth',\n        spec: 'Steer tires > 4/32\" tread; drive/trailer tires > 2/32\" tread',\n        status: 'pass',\n      },\n      {\n        id: 'tires-pressure',\n        label: 'Tire Pressure & Cold Inflation (100 PSI)',\n        spec: 'All 10 dual/steer tires at 100 PSI cold; valve caps sealed',\n        status: 'pass',\n      },\n      {\n        id: 'tires-lugnuts',\n        label: 'Lug Nuts & Wheel Rim Fasteners',\n        spec: 'All wheel studs present & torqued; no rust trails or rim cracks',\n        status: 'pass',\n      },\n      {\n        id: 'tires-hubseals',\n        label: 'Wheel Hub Oil Seals & Bearings',\n        spec: 'Oil level visible in sight glass; hub seals dry with no leaks',\n        status: 'pass',\n      },\n    ],\n  },\n  {\n    id: 'lights',\n    title: '3. Lights & Electrical Systems',\n    description: 'FMCSA § 393.9 Lamps, Reflective Devices & Electrical Wiring',\n    icon: 'lightbulb',\n    items: [\n      {\n        id: 'lights-headlights',\n        label: 'Headlights (Low & High Beams)',\n        spec: 'Both sealed beams operable; lenses clean and properly aimed',\n        status: 'pass',\n      },\n      {\n        id: 'lights-turnsignals',\n        label: 'Turn Signals & 4-Way Hazard Flashers',\n        spec: 'Front, cab-side, and rear flashers functional on tractor & trailer',\n        status: 'pass',\n      },\n      {\n        id: 'lights-brakelights',\n        label: 'Brake Lights & Tail Lights',\n        spec: 'Instant illumination upon pedal depression; lenses intact',\n        status: 'pass',\n      },\n      {\n        id: 'lights-clearance',\n        label: 'Clearance Lights & DOT Reflectors',\n        spec: 'Amber front/sides, red rear; DOT-C2 reflective sheeting clean',\n        status: 'pass',\n      },\n    ],\n  },\n  {\n    id: 'engine',\n    title: '4. Engine Compartment & Fluids',\n    description: 'Powertrain fluids, radiator integrity, belts & steering gear',\n    icon: 'wrench',\n    items: [\n      {\n        id: 'engine-oil',\n        label: 'Engine Oil Level & Quality',\n        spec: 'Dipstick level in safe crosshatch; oil clean without burnt odor',\n        status: 'pass',\n      },\n      {\n        id: 'engine-coolant',\n        label: 'Engine Coolant & Radiator Core',\n        spec: 'Surge tank level at MAX line; radiator cap tight, no hose weeping',\n        status: 'pass',\n      },\n      {\n        id: 'engine-powersteering',\n        label: 'Power Steering Fluid & Reservoir',\n        spec: 'Fluid level within cold fill mark; pump operates without whine',\n        status: 'pass',\n      },\n      {\n        id: 'engine-belts',\n        label: 'Serpentine Belts & Cooling Hoses',\n        spec: 'Belt deflection < 1/2\"; no rib fraying, cracks, or soft hoses',\n        status: 'pass',\n      },\n    ],\n  },\n  {\n    id: 'safety',\n    title: '5. Emergency & Safety Equipment',\n    description: 'FMCSA § 393.95 Emergency Equipment in Commercial Motor Vehicles',\n    icon: 'flame',\n    items: [\n      {\n        id: 'safety-extinguisher',\n        label: 'Fire Extinguisher (Charged & Tagged)',\n        spec: 'Minimum 5 B:C rating; pressure needle in green, annual tag valid',\n        status: 'pass',\n      },\n      {\n        id: 'safety-triangles',\n        label: 'Reflective Warning Triangles (3 Pack)',\n        spec: 'Three bidirectional red reflective triangles present & secured',\n        status: 'pass',\n      },\n      {\n        id: 'safety-firstaid',\n        label: 'First Aid & Spill Response Kit',\n        spec: 'Sealed commercial first aid pack, eye wash, HazMat pads',\n        status: 'pass',\n      },\n      {\n        id: 'safety-wipers',\n        label: 'Windshield Wipers, Washers & Horn',\n        spec: 'Clean sweep without streaks; air horn and electric city horn loud',\n        status: 'pass',\n      },\n    ],\n  },\n]\n\nconst DEFECT_SEED_NOTE =\n  'Air supply line to secondary reservoir exhibits slight pressure drop (down to 105 PSI under load). Audible hiss near tractor-trailer gladhand seal.'\n\n@Component({\n  changeDetection: ChangeDetectionStrategy.Eager,\n  selector: 'ui-driver-inspection-checklist, [ui-driver-inspection-checklist]',\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    UiInputComponent,\n    UiLabelComponent,\n    UiSelectComponent,\n    UiSelectContentComponent,\n    UiSelectItemComponent,\n    UiSelectTriggerComponent,\n    UiSelectValueComponent,\n    UiSeparatorComponent,\n    UiTextareaComponent,\n  ],\n  template: `\n    <div data-slot=\"driver-inspection-checklist\" [class]=\"rootClass\">\n      @if (submitted()) {\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 (hasDefects()) {\n                    <lucide-icon [img]=\"ShieldAlert\" class=\"size-8\" aria-hidden=\"true\" />\n                  } @else {\n                    <lucide-icon [img]=\"CheckCircle2\" class=\"size-8\" aria-hidden=\"true\" />\n                  }\n                </span>\n              </div>\n\n              <span ui-badge [variant]=\"hasDefects() ? 'destructive' : 'outline'\" [class]=\"receiptBadgeClass\">\n                FMCSA § 396.11 Certified Electronic DVIR\n              </span>\n\n              <h2 class=\"text-foreground text-2xl font-bold tracking-tight sm:text-3xl\">\n                {{ hasDefects() ? 'DVIR Transmitted · Defect Action Required' : 'DVIR Certified · Ready for Dispatch' }}\n              </h2>\n              <p class=\"text-muted-foreground mx-auto mt-1.5 max-w-xl text-xs sm:text-sm\">\n                {{\n                  hasDefects()\n                    ? 'Inspection report logged with safety defects. Maintenance dispatch notification has been dispatched to the terminal garage desk.'\n                    : 'Commercial motor vehicle safety inspection verified with zero safety defects. Safe to operate under FMCSA regulations.'\n                }}\n              </p>\n\n              <div\n                class=\"border-border bg-background/80 mt-4 inline-flex flex-wrap items-center gap-2 rounded-full border px-3.5 py-1 text-xs backdrop-blur-xs\"\n              >\n                <span class=\"text-muted-foreground font-medium\">Compliance Document Ref:</span>\n                <span class=\"text-foreground font-mono font-bold\">{{ reportId }}</span>\n              </div>\n            </div>\n\n            <div ui-card-content class=\"space-y-6 p-6\">\n              <div class=\"grid gap-4 sm:grid-cols-2 lg:grid-cols-4\">\n                <div class=\"border-border bg-muted/20 rounded-lg border p-3\">\n                  <span class=\"text-muted-foreground block text-xs font-medium\">Vehicle / Tractor</span>\n                  <span class=\"text-foreground mt-0.5 block text-sm font-semibold\">{{ vehicleId }}</span>\n                  <span class=\"text-muted-foreground text-xs\">{{ odometer }}</span>\n                </div>\n                <div class=\"border-border bg-muted/20 rounded-lg border p-3\">\n                  <span class=\"text-muted-foreground block text-xs font-medium\">Associated Trailer</span>\n                  <span class=\"text-foreground mt-0.5 block text-sm font-semibold\">{{ trailerId }}</span>\n                  <span class=\"text-muted-foreground text-xs\">Type: 53-ft Dry Van</span>\n                </div>\n                <div class=\"border-border bg-muted/20 rounded-lg border p-3\">\n                  <span class=\"text-muted-foreground block text-xs font-medium\">Certified Driver</span>\n                  <span class=\"text-foreground mt-0.5 block text-sm font-semibold\">{{ driverName }}</span>\n                  <span class=\"text-muted-foreground font-mono text-xs\">CDL #{{ driverCdl }}</span>\n                </div>\n                <div class=\"border-border bg-muted/20 rounded-lg border p-3\">\n                  <span class=\"text-muted-foreground block text-xs font-medium\">Timestamp & Hub</span>\n                  <span class=\"text-foreground mt-0.5 block text-sm font-semibold\">\n                    {{ inspectionDate }} · {{ inspectionTime }}\n                  </span>\n                  <span class=\"text-muted-foreground block truncate text-xs\">{{ location }}</span>\n                </div>\n              </div>\n\n              <div\n                class=\"border-border bg-card flex flex-wrap items-center justify-between gap-3 rounded-lg border p-4\"\n              >\n                <div class=\"flex flex-wrap items-center gap-x-6 gap-y-3\">\n                  <div>\n                    <span class=\"text-muted-foreground block text-xs\">Items Inspected</span>\n                    <span class=\"text-foreground text-lg font-bold tabular-nums\">\n                      {{ totalCount() }} / {{ totalCount() }}\n                    </span>\n                  </div>\n                  <ui-separator orientation=\"vertical\" class=\"h-8\" />\n                  <div>\n                    <span class=\"text-muted-foreground block text-xs\">Passed</span>\n                    <span class=\"text-success text-lg font-bold tabular-nums\">{{ passCount() }}</span>\n                  </div>\n                  <ui-separator orientation=\"vertical\" class=\"h-8\" />\n                  <div>\n                    <span class=\"text-muted-foreground block text-xs\">Failed / Defects</span>\n                    <span [class]=\"receiptFailClass\">{{ failCount() }}</span>\n                  </div>\n                  <ui-separator orientation=\"vertical\" class=\"h-8\" />\n                  <div>\n                    <span class=\"text-muted-foreground block text-xs\">N/A</span>\n                    <span class=\"text-muted-foreground text-lg font-bold tabular-nums\">{{ naCount() }}</span>\n                  </div>\n                </div>\n\n                <span ui-badge [variant]=\"hasDefects() ? 'destructive' : 'outline'\" class=\"gap-1.5 px-3 py-1 text-xs\">\n                  @if (!hasDefects()) {\n                    <lucide-icon [img]=\"CheckCircle2\" class=\"size-3.5\" />\n                  } @else {\n                    <lucide-icon [img]=\"AlertTriangle\" class=\"size-3.5\" />\n                  }\n                  {{ hasDefects() ? 'Defects Found (' + failCount() + ')' : 'All Systems Verified' }}\n                </span>\n              </div>\n\n              <div class=\"border-border bg-muted/15 space-y-2 rounded-xl border p-4\">\n                <div class=\"flex items-center justify-between\">\n                  <span class=\"text-muted-foreground flex items-center gap-1.5 text-xs font-medium\">\n                    <lucide-icon [img]=\"ShieldCheck\" class=\"text-primary size-3.5\" />\n                    Electronic Cryptographic Driver Signature\n                  </span>\n                  <span class=\"text-muted-foreground font-mono text-xs\">DOT § 396.11 Certified</span>\n                </div>\n                <div class=\"border-border/60 border-b pt-1 pb-3\">\n                  <p class=\"text-primary text-2xl font-medium tracking-wide italic\">\n                    {{ typedSignature() || driverName }}\n                  </p>\n                </div>\n                <div class=\"text-muted-foreground flex flex-wrap items-center justify-between gap-2 font-mono text-xs\">\n                  <span>Signer: {{ driverName }} · CDL #{{ driverCdl }}</span>\n                  <span>SHA-256: 8f9b7c2d-9482-41e9-b631-{{ reportId }}</span>\n                </div>\n              </div>\n\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 New 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 Driver Copy\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 Certified DVIR PDF\n                  </button>\n                </div>\n              </div>\n            </div>\n          </div>\n        </div>\n      } @else {\n        <div class=\"space-y-6\">\n          <!-- Top Inspection 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-1.5\">\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 font-medium\"\n                    >\n                      <lucide-icon [img]=\"Truck\" class=\"size-3.5\" aria-hidden=\"true\" />\n                      FMCSA § 396.11 Audit\n                    </span>\n\n                    @if (hasDefects()) {\n                      <span ui-badge variant=\"destructive\" class=\"animate-pulse gap-1.5 py-0.5 text-xs font-medium\">\n                        <lucide-icon [img]=\"AlertTriangle\" class=\"size-3.5\" aria-hidden=\"true\" />\n                        Defects Found · {{ failCount() }} {{ failCount() === 1 ? 'Item' : 'Items' }} Failed\n                      </span>\n                    } @else {\n                      <span\n                        ui-badge\n                        variant=\"outline\"\n                        class=\"border-warning/40 bg-warning/10 text-warning gap-1.5 py-0.5 text-xs font-medium\"\n                      >\n                        <lucide-icon [img]=\"Clock\" class=\"size-3.5\" aria-hidden=\"true\" />\n                        Inspection In Progress\n                      </span>\n                    }\n                  </div>\n\n                  <h3 ui-card-title class=\"text-xl font-bold tracking-tight sm:text-2xl\">\n                    Driver Vehicle Inspection Report (DVIR)\n                  </h3>\n                  <p ui-card-description class=\"text-xs sm:text-sm\">\n                    Mandatory pre-trip and post-trip commercial motor vehicle safety certification and defect tracking\n                    portal.\n                  </p>\n                </div>\n\n                <div class=\"flex flex-wrap items-center gap-2\">\n                  <button\n                    type=\"button\"\n                    ui-button\n                    variant=\"outline\"\n                    size=\"sm\"\n                    class=\"gap-1.5 text-xs font-medium\"\n                    (click)=\"markAllPass()\"\n                  >\n                    <lucide-icon [img]=\"CheckCircle2\" class=\"text-success size-3.5\" aria-hidden=\"true\" />\n                    Quick Pass All\n                  </button>\n                  <button\n                    type=\"button\"\n                    ui-button\n                    size=\"sm\"\n                    class=\"gap-1.5 text-xs font-medium\"\n                    [disabled]=\"!certified() || !typedSignature().trim()\"\n                    (click)=\"handleSubmit()\"\n                  >\n                    <lucide-icon [img]=\"FileCheck\" class=\"size-3.5\" aria-hidden=\"true\" />\n                    Submit Completed DVIR\n                  </button>\n                </div>\n              </div>\n            </div>\n\n            <div ui-card-content class=\"pt-0 pb-5\">\n              <div class=\"border-border bg-muted/20 grid gap-3 rounded-lg border p-4 sm:grid-cols-2 lg:grid-cols-4\">\n                <div class=\"space-y-1\">\n                  <div class=\"text-muted-foreground flex items-center gap-1.5 text-xs font-medium\">\n                    <lucide-icon [img]=\"Truck\" class=\"text-primary size-3.5\" />\n                    <span>Vehicle / Unit Number</span>\n                  </div>\n                  <div class=\"text-foreground text-xs font-semibold\">{{ vehicleId }}</div>\n                  <div class=\"text-muted-foreground text-xs\">Trailer: {{ trailerId }}</div>\n                </div>\n\n                <div class=\"space-y-1\">\n                  <div class=\"text-muted-foreground flex items-center gap-1.5 text-xs font-medium\">\n                    <lucide-icon [img]=\"Gauge\" class=\"text-primary size-3.5\" />\n                    <span>Odometer Mileage</span>\n                  </div>\n                  <div class=\"text-foreground text-xs font-semibold tabular-nums\">{{ odometer }}</div>\n                  <div class=\"text-muted-foreground text-xs\">ECM Telemetry Synced</div>\n                </div>\n\n                <div class=\"space-y-1\">\n                  <div class=\"text-muted-foreground flex items-center gap-1.5 text-xs font-medium\">\n                    <lucide-icon [img]=\"FileText\" class=\"text-primary size-3.5\" />\n                    <span>Inspection Type</span>\n                  </div>\n                  <ui-select [value]=\"inspectionType()\" (valueChange)=\"setInspectionType($event)\">\n                    <button ui-select-trigger class=\"h-7 text-xs font-medium\">\n                      <ui-select-value />\n                    </button>\n                    <ui-select-content>\n                      <ui-select-item value=\"pre-trip\">Pre-Trip Safety Inspection</ui-select-item>\n                      <ui-select-item value=\"post-trip\">Post-Trip Safety Audit</ui-select-item>\n                      <ui-select-item value=\"intermodal\">Intermodal Chassis Inspection</ui-select-item>\n                    </ui-select-content>\n                  </ui-select>\n                </div>\n\n                <div class=\"space-y-1\">\n                  <div class=\"text-muted-foreground flex items-center gap-1.5 text-xs font-medium\">\n                    <lucide-icon [img]=\"User\" class=\"text-primary size-3.5\" />\n                    <span>Driver & Terminal</span>\n                  </div>\n                  <div class=\"text-foreground text-xs font-semibold\">{{ driverName }} · CDL #{{ driverCdl }}</div>\n                  <div class=\"text-muted-foreground truncate text-xs\">{{ location }}</div>\n                </div>\n              </div>\n\n              <div class=\"mt-4 space-y-1.5\">\n                <div class=\"text-muted-foreground flex items-center justify-between text-xs\">\n                  <span>Audit Completion Progress</span>\n                  <span class=\"text-foreground font-mono font-medium tabular-nums\">\n                    {{ passCount() }} Pass · {{ failCount() }} Fail · {{ naCount() }} N/A ({{ totalCount() }} Total)\n                  </span>\n                </div>\n                <div class=\"bg-muted h-1.5 w-full overflow-hidden rounded-full\">\n                  <div [class]=\"progressBarClass\" [style.width]=\"completionPercentage() + '%'\"></div>\n                </div>\n              </div>\n            </div>\n          </div>\n\n          <!-- 5 FMCSA INSPECTION CATEGORIES -->\n          <div class=\"space-y-4\">\n            @for (category of categories(); track category.id) {\n              <div ui-card class=\"border-border overflow-hidden shadow-xs\">\n                <div ui-card-header class=\"bg-muted/15 border-border border-b px-5 py-3.5\">\n                  <div class=\"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between\">\n                    <div class=\"flex flex-wrap items-center gap-2.5\">\n                      <div\n                        class=\"border-primary/20 bg-primary/10 text-primary flex size-8 shrink-0 items-center justify-center rounded-md border\"\n                      >\n                        @if (category.icon === 'disc') {\n                          <lucide-icon [img]=\"Disc\" class=\"size-4\" />\n                        } @else if (category.icon === 'layers') {\n                          <lucide-icon [img]=\"Layers\" class=\"size-4\" />\n                        } @else if (category.icon === 'lightbulb') {\n                          <lucide-icon [img]=\"Lightbulb\" class=\"size-4\" />\n                        } @else if (category.icon === 'wrench') {\n                          <lucide-icon [img]=\"Wrench\" class=\"size-4\" />\n                        } @else if (category.icon === 'flame') {\n                          <lucide-icon [img]=\"Flame\" class=\"size-4\" />\n                        }\n                      </div>\n                      <div>\n                        <h3 ui-card-title class=\"text-sm font-bold tracking-tight sm:text-base\">\n                          {{ category.title }}\n                        </h3>\n                        <p ui-card-description class=\"text-xs\">{{ category.description }}</p>\n                      </div>\n                    </div>\n\n                    <div class=\"flex flex-wrap items-center gap-2 self-end sm:self-auto\">\n                      <button\n                        type=\"button\"\n                        ui-button\n                        variant=\"ghost\"\n                        size=\"sm\"\n                        class=\"text-muted-foreground hover:text-foreground h-7 text-xs\"\n                        (click)=\"setCategoryAll(category.id, 'pass')\"\n                      >\n                        Pass All\n                      </button>\n                      <button\n                        type=\"button\"\n                        ui-button\n                        variant=\"ghost\"\n                        size=\"sm\"\n                        class=\"text-muted-foreground hover:text-foreground h-7 text-xs\"\n                        (click)=\"setCategoryAll(category.id, 'na')\"\n                      >\n                        N/A All\n                      </button>\n                    </div>\n                  </div>\n                </div>\n\n                <div ui-card-content class=\"divide-border divide-y p-0\">\n                  @for (item of category.items; track item.id) {\n                    <div [class]=\"itemRowClass(item.status)\">\n                      <div class=\"min-w-0 space-y-1 pr-2\">\n                        <div class=\"flex flex-wrap items-center gap-2\">\n                          <span class=\"text-foreground text-xs font-semibold sm:text-sm\">{{ item.label }}</span>\n                          @if (item.status === 'fail') {\n                            <span ui-badge variant=\"destructive\" class=\"h-4 py-0 font-mono text-xs uppercase\">\n                              Defect\n                            </span>\n                          }\n                        </div>\n                        <p class=\"text-muted-foreground text-xs leading-relaxed\">{{ item.spec }}</p>\n                      </div>\n\n                      <div class=\"flex shrink-0 items-center gap-1 self-start sm:self-center\">\n                        <button\n                          type=\"button\"\n                          [attr.aria-label]=\"'Mark ' + item.label + ' as Pass'\"\n                          [class]=\"segmentClass(item.status, 'pass')\"\n                          (click)=\"setItemStatus(category.id, item.id, 'pass')\"\n                        >\n                          <lucide-icon [img]=\"Check\" class=\"size-3.5\" aria-hidden=\"true\" />\n                          Pass\n                        </button>\n                        <button\n                          type=\"button\"\n                          [attr.aria-label]=\"'Mark ' + item.label + ' as Fail'\"\n                          [class]=\"segmentClass(item.status, 'fail')\"\n                          (click)=\"setItemStatus(category.id, item.id, 'fail')\"\n                        >\n                          <lucide-icon [img]=\"X\" class=\"size-3.5\" aria-hidden=\"true\" />\n                          Fail\n                        </button>\n                        <button\n                          type=\"button\"\n                          [attr.aria-label]=\"'Mark ' + item.label + ' as Not Applicable'\"\n                          [class]=\"segmentClass(item.status, 'na')\"\n                          (click)=\"setItemStatus(category.id, item.id, 'na')\"\n                        >\n                          <lucide-icon [img]=\"Minus\" class=\"size-3.5\" aria-hidden=\"true\" />\n                          N/A\n                        </button>\n                      </div>\n                    </div>\n                  }\n                </div>\n              </div>\n            }\n          </div>\n\n          <!-- DYNAMIC DEFECT REPORT CARD -->\n          @if (hasDefects()) {\n            <div\n              ui-card\n              class=\"border-destructive/40 bg-destructive/5 dark:bg-destructive/10 overflow-hidden shadow-xs transition-colors duration-200\"\n            >\n              <div ui-card-header class=\"border-destructive/20 bg-destructive/10 border-b pb-4\">\n                <div class=\"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between\">\n                  <div class=\"flex flex-wrap items-center gap-2.5\">\n                    <div\n                      class=\"bg-destructive/20 text-destructive flex size-8 shrink-0 items-center justify-center rounded-md\"\n                    >\n                      <lucide-icon [img]=\"AlertTriangle\" class=\"size-4.5\" aria-hidden=\"true\" />\n                    </div>\n                    <div>\n                      <h3 ui-card-title class=\"text-destructive text-base font-bold\">\n                        Critical Defect Log & Repair Dispatch Form\n                      </h3>\n                      <p ui-card-description class=\"text-destructive/80 text-xs\">\n                        {{ failCount() }} item(s) flagged with safety defects requiring mechanic sign-off under FMCSA §\n                        396.13.\n                      </p>\n                    </div>\n                  </div>\n\n                  <span ui-badge variant=\"destructive\" class=\"font-mono text-xs uppercase\">Action Required</span>\n                </div>\n              </div>\n\n              <div ui-card-content class=\"space-y-4 p-5\">\n                <div class=\"space-y-1.5\">\n                  <label ui-label class=\"text-foreground text-xs font-semibold\">Defective Components Identified</label>\n                  <div class=\"flex flex-wrap gap-2\">\n                    @for (item of failedItems(); track item.id) {\n                      <span\n                        class=\"border-destructive/30 bg-destructive/10 text-destructive inline-flex items-center gap-1.5 rounded-md border px-2.5 py-1 text-xs font-medium\"\n                      >\n                        <lucide-icon [img]=\"AlertCircle\" class=\"size-3.5 shrink-0\" />\n                        {{ item.label }}\n                      </span>\n                    }\n                  </div>\n                </div>\n\n                <div class=\"grid gap-4 sm:grid-cols-2\">\n                  <div class=\"min-w-0 space-y-1.5\">\n                    <label ui-label for=\"defect-severity-ng\" class=\"text-xs font-semibold\">\n                      Defect Severity Classification *\n                    </label>\n                    <ui-select [value]=\"defectSeverity()\" (valueChange)=\"setDefectSeverity($event)\">\n                      <button\n                        ui-select-trigger\n                        id=\"defect-severity-ng\"\n                        class=\"h-9 w-full min-w-0 text-xs [&>span]:truncate\"\n                      >\n                        <ui-select-value />\n                      </button>\n                      <ui-select-content>\n                        <ui-select-item value=\"minor\">\n                          Minor Defect — Safe to operate; scheduled for terminal shop\n                        </ui-select-item>\n                        <ui-select-item value=\"critical\">\n                          Out-of-Service (OOS) Critical — Dispatch prohibited until repaired\n                        </ui-select-item>\n                      </ui-select-content>\n                    </ui-select>\n                  </div>\n\n                  <div class=\"space-y-1.5\">\n                    <label ui-label class=\"text-xs font-semibold\">Fleet Maintenance Desk Dispatch</label>\n                    <div class=\"border-border bg-card flex flex-wrap items-center gap-2 rounded-md border p-2 text-xs\">\n                      <ui-checkbox\n                        id=\"desk-notify-ng\"\n                        [checked]=\"defectReportedToDesk()\"\n                        (checkedChange)=\"defectReportedToDesk.set(!!$event)\"\n                      />\n                      <label ui-label for=\"desk-notify-ng\" class=\"cursor-pointer text-xs font-normal\">\n                        Auto-create Priority Work Order in Garage Portal (Ticket #WO-8910)\n                      </label>\n                    </div>\n                  </div>\n                </div>\n\n                <div class=\"space-y-1.5\">\n                  <label ui-label for=\"defect-notes-ng\" class=\"text-xs font-semibold\">\n                    Detailed Defect Description & Driver Notes *\n                  </label>\n                  <ui-textarea\n                    id=\"defect-notes-ng\"\n                    [value]=\"defectNotes()\"\n                    (valueChange)=\"defectNotes.set($event)\"\n                    [rows]=\"3\"\n                    placeholder=\"Describe exact defect location, leak sounds, tire damage, PSI measurements, or electrical malfunction...\"\n                    class=\"text-xs\"\n                  />\n                </div>\n\n                <div class=\"space-y-2\">\n                  <div class=\"flex items-center justify-between\">\n                    <label ui-label class=\"flex items-center gap-1.5 text-xs font-semibold\">\n                      <lucide-icon [img]=\"Camera\" class=\"text-primary size-3.5\" />\n                      Defect Photographic Evidence\n                    </label>\n                    <span class=\"text-muted-foreground text-xs\">JPG, PNG up to 15MB</span>\n                  </div>\n\n                  <div\n                    role=\"button\"\n                    tabindex=\"0\"\n                    aria-label=\"Upload photo\"\n                    class=\"border-border/80 hover:border-primary/50 focus-visible:ring-ring bg-card cursor-pointer rounded-xl border-2 border-dashed p-4 text-center transition-colors outline-none focus-visible:ring-2\"\n                    (click)=\"addMockPhoto()\"\n                    (keydown)=\"onDropzoneKeydown($event)\"\n                  >\n                    <div class=\"flex flex-col items-center justify-center gap-1.5 py-2\">\n                      <div class=\"bg-primary/10 text-primary flex size-9 items-center justify-center rounded-full\">\n                        <lucide-icon [img]=\"UploadCloud\" class=\"size-4.5\" />\n                      </div>\n                      <p class=\"text-foreground text-xs font-medium\">\n                        Click to attach photo or drag and drop image here\n                      </p>\n                      <p class=\"text-muted-foreground text-xs\">\n                        Capture close-ups of damaged tires, fluid puddles, broken lights, or air fittings\n                      </p>\n                    </div>\n                  </div>\n\n                  @if (defectPhotos().length > 0) {\n                    <div class=\"grid gap-2 sm:grid-cols-2\">\n                      @for (photo of defectPhotos(); track photo.id) {\n                        <div\n                          class=\"border-border bg-card flex items-center justify-between rounded-lg border px-3 py-2 text-xs\"\n                        >\n                          <div class=\"flex flex-wrap items-center gap-2 truncate\">\n                            <lucide-icon [img]=\"Camera\" class=\"text-primary size-3.5 shrink-0\" />\n                            <span class=\"text-foreground truncate font-medium\">{{ photo.name }}</span>\n                            <span class=\"text-muted-foreground text-xs\">({{ photo.size }})</span>\n                          </div>\n                          <button\n                            type=\"button\"\n                            aria-label=\"Remove photo\"\n                            class=\"text-muted-foreground hover:text-destructive focus-visible:ring-ring cursor-pointer rounded-sm p-1 transition-colors outline-none focus-visible:ring-2\"\n                            (click)=\"removePhoto(photo.id)\"\n                          >\n                            <lucide-icon [img]=\"Trash2\" class=\"size-3.5\" />\n                          </button>\n                        </div>\n                      }\n                    </div>\n                  }\n                </div>\n              </div>\n            </div>\n          }\n\n          <!-- DRIVER CERTIFICATION & SIGNATURE -->\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]=\"ShieldCheck\" class=\"text-primary size-4\" />\n                  <h3 ui-card-title class=\"text-base font-bold\">Driver Safety Certification & Electronic Signature</h3>\n                </div>\n                <span ui-badge variant=\"outline\" class=\"text-primary border-primary/30 font-mono text-xs\">\n                  FMCSA § 396.11(a)\n                </span>\n              </div>\n              <p ui-card-description class=\"text-xs\">\n                Commercial motor vehicle driver must certify that all required items have been inspected and all known\n                defects disclosed.\n              </p>\n            </div>\n\n            <div ui-card-content class=\"space-y-4\">\n              <div class=\"border-border bg-muted/20 rounded-lg border p-3.5\">\n                <div class=\"flex items-start gap-3\">\n                  <ui-checkbox\n                    id=\"cert-check-ng\"\n                    [checked]=\"certified()\"\n                    (checkedChange)=\"certified.set(!!$event)\"\n                    class=\"mt-0.5\"\n                  />\n                  <div class=\"space-y-1\">\n                    <label\n                      ui-label\n                      for=\"cert-check-ng\"\n                      class=\"text-foreground cursor-pointer text-xs leading-relaxed font-semibold\"\n                    >\n                      I certify that I have conducted a thorough safety inspection of this vehicle and trailer in\n                      compliance with Federal Motor Carrier Safety Regulations.\n                    </label>\n                    <p class=\"text-muted-foreground text-xs leading-relaxed\">\n                      All components listed above have been checked. Any conditions likely to affect the safe operation\n                      of this vehicle or result in mechanical breakdown have been truthfully recorded.\n                    </p>\n                  </div>\n                </div>\n              </div>\n\n              <div class=\"grid gap-3 sm:grid-cols-3\">\n                <div class=\"space-y-1.5 sm:col-span-2\">\n                  <label ui-label for=\"driver-sig-ng\" class=\"text-xs font-semibold\">\n                    Type Full Legal Name as Electronic Signature *\n                  </label>\n                  <ui-input\n                    id=\"driver-sig-ng\"\n                    [value]=\"typedSignature()\"\n                    (valueChange)=\"typedSignature.set($event)\"\n                    placeholder=\"Marcus Vance\"\n                    class=\"h-8 text-xs\"\n                  />\n                </div>\n                <div class=\"space-y-1.5\">\n                  <label ui-label class=\"text-xs font-semibold\">Inspection Timestamp</label>\n                  <div\n                    class=\"border-border bg-muted/30 text-muted-foreground flex h-8 items-center rounded-md border px-3 font-mono text-xs\"\n                  >\n                    {{ inspectionDate }} · {{ inspectionTime }}\n                  </div>\n                </div>\n              </div>\n\n              <div class=\"border-primary/30 bg-primary/5 space-y-2 rounded-xl border p-4\">\n                <div class=\"flex items-center justify-between\">\n                  <span class=\"text-muted-foreground flex items-center gap-1.5 text-xs font-medium\">\n                    <lucide-icon [img]=\"ShieldCheck\" class=\"text-primary size-3.5\" />\n                    Live Digital Signature Stamp\n                  </span>\n                  <span class=\"text-primary font-mono text-xs font-medium\">Verified CDL Class-A Holder</span>\n                </div>\n\n                <div class=\"border-primary/20 border-b pt-1 pb-2\">\n                  <p class=\"text-primary text-2xl font-medium tracking-wide italic\">\n                    {{ typedSignature() || 'Marcus Vance' }}\n                  </p>\n                </div>\n\n                <div class=\"text-muted-foreground flex flex-wrap items-center justify-between gap-2 font-mono text-xs\">\n                  <span>Driver: {{ driverName }} · CDL #{{ driverCdl }}</span>\n                  <span>Carrier: {{ carrierName }} ({{ dotNumber }})</span>\n                </div>\n              </div>\n            </div>\n\n            <div\n              ui-card-footer\n              class=\"border-border bg-muted/15 flex flex-wrap items-center justify-between gap-3 border-t px-6 py-4\"\n            >\n              <div class=\"text-muted-foreground text-xs\">\n                Audit Status:\n                <strong class=\"text-foreground\"\n                  >{{ passCount() }} Pass, {{ failCount() }} Fail, {{ naCount() }} N/A</strong\n                >\n              </div>\n\n              <div class=\"flex flex-wrap items-center gap-2\">\n                <button\n                  type=\"button\"\n                  ui-button\n                  variant=\"outline\"\n                  size=\"sm\"\n                  class=\"text-xs font-medium\"\n                  (click)=\"handleReset()\"\n                >\n                  Reset Audit\n                </button>\n                <button\n                  type=\"button\"\n                  ui-button\n                  size=\"sm\"\n                  class=\"gap-1.5 text-xs font-medium\"\n                  [disabled]=\"!certified() || !typedSignature().trim()\"\n                  (click)=\"handleSubmit()\"\n                >\n                  <lucide-icon [img]=\"FileCheck\" class=\"size-4\" aria-hidden=\"true\" />\n                  Submit Completed DVIR\n                </button>\n              </div>\n            </div>\n          </div>\n        </div>\n      }\n    </div>\n  `,\n})\nexport class UiDriverInspectionChecklistComponent {\n  protected readonly AlertCircle = AlertCircle\n  protected readonly AlertTriangle = AlertTriangle\n  protected readonly Camera = Camera\n  protected readonly Check = Check\n  protected readonly CheckCircle2 = CheckCircle2\n  protected readonly Clock = Clock\n  protected readonly Disc = Disc\n  protected readonly Download = Download\n  protected readonly FileCheck = FileCheck\n  protected readonly FileText = FileText\n  protected readonly Flame = Flame\n  protected readonly Gauge = Gauge\n  protected readonly Layers = Layers\n  protected readonly Lightbulb = Lightbulb\n  protected readonly Minus = Minus\n  protected readonly Printer = Printer\n  protected readonly RotateCcw = RotateCcw\n  protected readonly ShieldAlert = ShieldAlert\n  protected readonly ShieldCheck = ShieldCheck\n  protected readonly Trash2 = Trash2\n  protected readonly Truck = Truck\n  protected readonly UploadCloud = UploadCloud\n  protected readonly User = User\n  protected readonly Wrench = Wrench\n  protected readonly X = X\n\n  protected readonly reportId = 'DVIR-2026-90412'\n  protected readonly carrierName = 'Apex Freight Logistics Inc.'\n  protected readonly dotNumber = 'USDOT #2940182'\n  protected readonly inspectionDate = '2026-08-21'\n  protected readonly inspectionTime = '06:45 AM EDT'\n  protected readonly location = 'Terminal #12 · Ontario Logistics Hub, CA'\n\n  @Input() vehicleId = 'Truck #104 · Freightliner Cascadia'\n  @Input() trailerId = \"Trailer #TR-8821 (53' Dry Van)\"\n  @Input() odometer = '142,850 miles'\n  @Input() driverName = 'Marcus Vance'\n  @Input() driverCdl = 'CA-948201'\n  @Input() set initialInspectionType(v: InspectionType) {\n    this.inspectionType.set(v)\n  }\n  @Input() set initialDefectState(v: boolean) {\n    this.applyDefectSeed(!!v)\n  }\n  @Input() set initialSubmitted(v: boolean) {\n    this.submitted.set(!!v)\n  }\n  @Input('class') className?: string\n  @Output() submit = new EventEmitter<DVIRReportData>()\n  @Output() defectChange = new EventEmitter<InspectionItem[]>()\n\n  readonly inspectionType = signal<InspectionType>('pre-trip')\n  readonly categories = signal<InspectionCategory[]>(\n    DEFAULT_CATEGORIES.map((cat) => ({ ...cat, items: cat.items.map((item) => ({ ...item })) })),\n  )\n  readonly defectSeverity = signal<DefectSeverity>('minor')\n  readonly defectNotes = signal('')\n  readonly defectReportedToDesk = signal(true)\n  readonly defectPhotos = signal<DefectPhoto[]>([])\n  readonly certified = signal(true)\n  readonly typedSignature = signal('Marcus Vance')\n  readonly submitted = signal(false)\n\n  private photoCounter = 0\n\n  constructor() {\n    this.typedSignature.set(this.driverName)\n  }\n\n  readonly allItems = computed(() => this.categories().flatMap((c) => c.items))\n  readonly totalCount = computed(() => this.allItems().length)\n  readonly passCount = computed(() => this.allItems().filter((i) => i.status === 'pass').length)\n  readonly failCount = computed(() => this.allItems().filter((i) => i.status === 'fail').length)\n  readonly naCount = computed(() => this.allItems().filter((i) => i.status === 'na').length)\n  readonly failedItems = computed(() => this.allItems().filter((i) => i.status === 'fail'))\n  readonly hasDefects = computed(() => this.failedItems().length > 0)\n  readonly completionPercentage = computed(() => {\n    const total = this.totalCount()\n    return total > 0 ? Math.round((this.allItems().filter((i) => i.status !== undefined).length / total) * 100) : 0\n  })\n\n  get rootClass(): string {\n    return cn('text-foreground mx-auto w-full max-w-5xl space-y-6', this.className)\n  }\n\n  get progressBarClass(): string {\n    return cn('h-full transition-[width] duration-300', this.hasDefects() ? 'bg-warning' : 'bg-primary')\n  }\n\n  get receiptBannerClass(): string {\n    return cn(\n      'border-b p-6 text-center sm:p-8',\n      this.hasDefects() ? 'border-warning/30 bg-warning/10' : 'border-success/30 bg-success/10',\n    )\n  }\n\n  get receiptGlowClass(): string {\n    return cn('absolute inset-0 rounded-full blur-xl', this.hasDefects() ? 'bg-warning/30' : 'bg-success/30')\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.hasDefects()\n        ? 'border-warning/40 bg-warning/20 text-warning'\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.hasDefects() && 'border-success/30 bg-success/10 text-success',\n    )\n  }\n\n  get receiptFailClass(): string {\n    return cn('text-lg font-bold tabular-nums', this.failCount() > 0 ? 'text-destructive' : 'text-muted-foreground')\n  }\n\n  itemRowClass(status: CheckStatus): string {\n    return cn(\n      'flex flex-col gap-3 p-4 transition-colors sm:flex-row sm:items-center sm:justify-between',\n      status === 'fail' ? 'bg-destructive/5' : 'hover:bg-muted/30',\n    )\n  }\n\n  segmentClass(current: CheckStatus, kind: CheckStatus): string {\n    const base =\n      'focus-visible:ring-ring inline-flex cursor-pointer items-center gap-1.5 rounded-md border px-2.5 py-1 text-xs font-medium shadow-xs transition-colors outline-none focus-visible:ring-2'\n    if (current === kind) {\n      if (kind === 'pass') return cn(base, 'border-success/40 bg-success/15 text-success font-semibold')\n      if (kind === 'fail') return cn(base, 'border-destructive/40 bg-destructive/15 text-destructive font-semibold')\n      return cn(base, 'border-border bg-muted text-foreground font-semibold')\n    }\n    return cn(base, 'border-border bg-background text-muted-foreground hover:bg-muted hover:text-foreground')\n  }\n\n  setInspectionType(value: string): void {\n    this.inspectionType.set(value as InspectionType)\n  }\n\n  setDefectSeverity(value: string): void {\n    this.defectSeverity.set(value as DefectSeverity)\n  }\n\n  private applyDefectSeed(on: boolean): void {\n    this.categories.set(\n      DEFAULT_CATEGORIES.map((cat) => ({\n        ...cat,\n        items: cat.items.map((item) => {\n          if (on && (item.id === 'brakes-airlines' || item.id === 'tires-pressure')) {\n            return { ...item, status: 'fail' as CheckStatus }\n          }\n          return { ...item }\n        }),\n      })),\n    )\n    this.defectSeverity.set(on ? 'critical' : 'minor')\n    this.defectNotes.set(on ? DEFECT_SEED_NOTE : '')\n    this.defectPhotos.set(\n      on\n        ? [\n            { id: 'p1', name: 'gladhand_seal_wear.jpg', size: '2.4 MB' },\n            { id: 'p2', name: 'air_pressure_gauge_105psi.png', size: '1.8 MB' },\n          ]\n        : [],\n    )\n  }\n\n  setItemStatus(categoryId: string, itemId: string, status: CheckStatus): void {\n    this.categories.update((prev) =>\n      prev.map((cat) => {\n        if (cat.id !== categoryId) return cat\n        return { ...cat, items: cat.items.map((item) => (item.id === itemId ? { ...item, status } : item)) }\n      }),\n    )\n    this.emitDefectChange()\n  }\n\n  setCategoryAll(categoryId: string, status: CheckStatus): void {\n    this.categories.update((prev) =>\n      prev.map((cat) => {\n        if (cat.id !== categoryId) return cat\n        return { ...cat, items: cat.items.map((item) => ({ ...item, status })) }\n      }),\n    )\n    this.emitDefectChange()\n  }\n\n  markAllPass(): void {\n    this.categories.update((prev) =>\n      prev.map((cat) => ({ ...cat, items: cat.items.map((item) => ({ ...item, status: 'pass' as CheckStatus })) })),\n    )\n    this.emitDefectChange()\n  }\n\n  addMockPhoto(): void {\n    this.photoCounter += 1\n    const n = this.photoCounter + this.defectPhotos().length\n    this.defectPhotos.update((prev) => [\n      ...prev,\n      { id: `photo-${Date.now()}-${this.photoCounter}`, name: `defect_evidence_0${n}.jpg`, size: '1.9 MB' },\n    ])\n  }\n\n  removePhoto(id: string): void {\n    this.defectPhotos.update((prev) => prev.filter((p) => p.id !== id))\n  }\n\n  onDropzoneKeydown(event: KeyboardEvent): void {\n    if (event.key === 'Enter' || event.key === ' ') {\n      event.preventDefault()\n      this.addMockPhoto()\n    }\n  }\n\n  private emitDefectChange(): void {\n    this.defectChange.emit(this.failedItems())\n  }\n\n  handleSubmit(): void {\n    if (!this.certified() || this.typedSignature().trim() === '') return\n    this.submitted.set(true)\n    this.submit.emit({\n      reportId: this.reportId,\n      vehicleId: this.vehicleId,\n      trailerId: this.trailerId,\n      odometer: this.odometer,\n      inspectionType: this.inspectionType(),\n      driverName: this.driverName,\n      driverCdl: this.driverCdl,\n      carrierName: this.carrierName,\n      dotNumber: this.dotNumber,\n      inspectionDate: this.inspectionDate,\n      inspectionTime: this.inspectionTime,\n      location: this.location,\n      categories: this.categories(),\n      defectSeverity: this.defectSeverity(),\n      defectNotes: this.defectNotes(),\n      defectPhotos: this.defectPhotos(),\n      certified: this.certified(),\n      signatureTimestamp: new Date().toISOString(),\n    })\n  }\n\n  handleReset(): void {\n    this.submitted.set(false)\n    this.markAllPass()\n    this.defectNotes.set('')\n    this.defectPhotos.set([])\n  }\n}\n",
      "type": "registry:block",
      "target": "~/src/app/components/blocks/driver-inspection-checklist/driver-inspection-checklist.component.ts"
    },
    {
      "path": "packages/registry-angular/blocks/driver-inspection-checklist/index.ts",
      "content": "export {\n  UiDriverInspectionChecklistComponent,\n  type CheckStatus,\n  type DVIRReportData,\n  type DefectPhoto,\n  type DefectSeverity,\n  type InspectionCategory,\n  type InspectionItem,\n  type InspectionType,\n} from './driver-inspection-checklist.component'\n",
      "type": "registry:block",
      "target": "~/src/app/components/blocks/driver-inspection-checklist/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/input.json",
    "https://uipkge.dev/r/angular/label.json",
    "https://uipkge.dev/r/angular/select.json",
    "https://uipkge.dev/r/angular/separator.json",
    "https://uipkge.dev/r/angular/textarea.json"
  ],
  "description": "Commercial vehicle Driver Vehicle Inspection Report (DVIR) pre-trip and post-trip safety audit. Features vehicle odometer & ELD telemetry header, 5 grouped FMCSA safety inspection categories (Brakes & Air Pressure, Tires & Wheels, Lights & Electrical, Engine & Fluids, Emergency Safety Gear) with Pass/Fail/N/A segmented controls, dynamic defect report card with Out-of-Service severity classification, defect notes, photo dropzone, driver CDL certification signature pad, and post-submission compliance receipt.",
  "categories": [
    "logistics",
    "app",
    "forms"
  ]
}