{
  "$schema": "https://shadcn-vue.com/schema/registry-item.json",
  "name": "prescription-refill-manager",
  "title": "Prescription Refill Manager",
  "type": "registry:block",
  "files": [
    {
      "path": "packages/registry-vue/blocks/prescription-refill-manager/PrescriptionRefillManager.vue",
      "content": "<script setup lang=\"ts\">\nimport { computed, ref } from 'vue'\nimport type { HTMLAttributes } from 'vue'\nimport {\n  AlertCircle,\n  ArrowLeftRight,\n  Building2,\n  CheckCircle2,\n  Clock,\n  MapPin,\n  Phone,\n  Pill,\n  Plus,\n  Store,\n  Truck,\n} from 'lucide-vue-next'\nimport { cn } from '@/lib/utils'\nimport { Badge } from '@/components/ui/badge'\nimport { Button } from '@/components/ui/button'\nimport { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'\nimport { Separator } from '@/components/ui/separator'\nimport ChangePharmacyDialog from './ChangePharmacyDialog.vue'\nimport PrescriptionsTable from './PrescriptionsTable.vue'\nimport PriorAuthDialog from './PriorAuthDialog.vue'\nimport RefillOrderDialog from './RefillOrderDialog.vue'\nimport TrackingDialog from './TrackingDialog.vue'\nimport TransferDialog from './TransferDialog.vue'\nimport { defaultAvailablePharmacies, defaultPrescriptions } from './prescription-refill-manager-data'\nimport type { Pharmacy, Prescription, TransferFormState } from './prescription-refill-manager-types'\n\nexport type { Pharmacy, Prescription, PrescriptionStatus } from './prescription-refill-manager-types'\n\nconst props = defineProps<{\n  class?: HTMLAttributes['class']\n}>()\n\nconst prescriptions = ref<Prescription[]>([...defaultPrescriptions])\nconst availablePharmacies = ref<Pharmacy[]>([...defaultAvailablePharmacies])\n\n// State variables\nconst activePharmacy = ref<Pharmacy>(availablePharmacies.value[0])\n\n// Refill modal state\nconst isRefillOpen = ref(false)\nconst selectedPrescriptionId = ref<string>('rx-1')\n\n// Tracking modal state\nconst isTrackingOpen = ref(false)\nconst trackingPrescription = ref<Prescription | null>(null)\n\n// Transfer modal state\nconst isTransferOpen = ref(false)\nconst transferForm = ref<TransferFormState>({\n  pharmacyName: '',\n  phone: '',\n  rxNumber: '',\n  medicationName: '',\n  notes: '',\n})\nconst transferSubmitted = ref(false)\n\n// Change pharmacy modal state\nconst isChangePharmacyOpen = ref(false)\nconst tempSelectedPharmacyId = ref(activePharmacy.value.id)\n\n// Prescribing MD Auth Request modal state\nconst isAuthRequestOpen = ref(false)\nconst authRequestedRx = ref<Prescription | null>(null)\nconst authRequestSubmitted = ref(false)\n\nconst selectedPrescription = computed(() => {\n  return prescriptions.value.find((rx) => rx.id === selectedPrescriptionId.value) || prescriptions.value[0]\n})\n\n// Action handlers\nfunction openRefillModal(prescriptionId?: string) {\n  if (prescriptionId) {\n    selectedPrescriptionId.value = prescriptionId\n  } else {\n    // Default to the first ready prescription\n    const readyMed = prescriptions.value.find((r) => r.status === 'ready')\n    selectedPrescriptionId.value = readyMed ? readyMed.id : prescriptions.value[0].id\n  }\n  isRefillOpen.value = true\n}\n\nfunction handleOpenTracking(rx: Prescription) {\n  trackingPrescription.value = rx\n  isTrackingOpen.value = true\n}\n\nfunction handleOpenAuthRequest(rx: Prescription) {\n  authRequestedRx.value = rx\n  authRequestSubmitted.value = false\n  isAuthRequestOpen.value = true\n}\n\nfunction handleOpenTransfer() {\n  transferForm.value = {\n    pharmacyName: '',\n    phone: '',\n    rxNumber: '',\n    medicationName: '',\n    notes: '',\n  }\n  transferSubmitted.value = false\n  isTransferOpen.value = true\n}\n\nfunction handleChangePharmacy() {\n  tempSelectedPharmacyId.value = activePharmacy.value.id\n  isChangePharmacyOpen.value = true\n}\n\nfunction savePharmacyChange() {\n  const chosen = availablePharmacies.value.find((p) => p.id === tempSelectedPharmacyId.value)\n  if (chosen) {\n    activePharmacy.value = chosen\n  }\n  isChangePharmacyOpen.value = false\n}\n</script>\n\n<template>\n  <div\n    data-slot=\"prescription-refill-manager\"\n    :class=\"cn('bg-background text-foreground w-full space-y-6', props.class)\"\n  >\n    <!-- Header Section -->\n    <header\n      class=\"bg-card border-border flex flex-col justify-between gap-4 rounded-xl border p-5 shadow-xs sm:p-6 md:flex-row md:items-center\"\n    >\n      <div class=\"space-y-1\">\n        <div class=\"flex flex-wrap items-center gap-2.5\">\n          <div class=\"bg-primary/10 text-primary flex size-8 items-center justify-center rounded-lg\">\n            <Pill class=\"size-4\" />\n          </div>\n          <h1 class=\"text-foreground text-xl font-bold tracking-tight sm:text-2xl\">Prescriptions & Medications</h1>\n          <Badge variant=\"outline\" class=\"border-primary/20 bg-primary/5 text-primary text-xs font-medium\">\n            Active Care Plan\n          </Badge>\n        </div>\n        <p class=\"text-muted-foreground text-sm\">\n          Manage recurring refills, dosage schedules, and home delivery tracking.\n        </p>\n      </div>\n\n      <div class=\"flex flex-wrap items-center gap-2.5\">\n        <Button variant=\"outline\" class=\"gap-1.5 text-xs font-medium\" @click=\"handleOpenTransfer\">\n          <ArrowLeftRight class=\"size-3.5\" />\n          Transfer Prescription\n        </Button>\n        <Button variant=\"default\" class=\"gap-1.5 text-xs font-medium shadow-xs\" @click=\"openRefillModal()\">\n          <Plus class=\"size-3.5\" />\n          Request Refill\n        </Button>\n      </div>\n    </header>\n\n    <!-- 3 Medication Status Metric Cards -->\n    <section class=\"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3\">\n      <!-- Active Prescriptions -->\n      <Card class=\"shadow-xs\">\n        <CardContent class=\"flex items-center justify-between p-5\">\n          <div class=\"space-y-1\">\n            <p class=\"text-muted-foreground text-xs font-medium\">Active Prescriptions</p>\n            <div class=\"flex items-baseline gap-2\">\n              <span class=\"text-foreground text-2xl font-bold tracking-tight tabular-nums\">4</span>\n              <span class=\"text-muted-foreground text-xs\">Total on file</span>\n            </div>\n            <p class=\"text-muted-foreground text-xs\">All active maintenance therapies</p>\n          </div>\n          <div class=\"bg-primary/10 text-primary flex size-11 shrink-0 items-center justify-center rounded-xl\">\n            <Pill class=\"size-5\" />\n          </div>\n        </CardContent>\n      </Card>\n\n      <!-- Refills Ready for Order -->\n      <Card class=\"border-warning/30 bg-warning/5 bg-warning/10 shadow-xs\">\n        <CardContent class=\"flex items-center justify-between p-5\">\n          <div class=\"space-y-1\">\n            <div class=\"flex items-center gap-1.5\">\n              <p class=\"text-warning text-xs font-semibold\">Refills Ready for Order</p>\n              <Badge variant=\"outline\" class=\"border-warning/40 bg-warning/15 text-warning text-xs font-medium\">\n                2 Action Needed\n              </Badge>\n            </div>\n            <div class=\"flex items-baseline gap-2\">\n              <span class=\"text-warning text-warning text-2xl font-bold tracking-tight tabular-nums\">2</span>\n              <span class=\"text-warning/80 text-xs\">Meds eligible now</span>\n            </div>\n            <p class=\"text-warning/80 text-xs\">Metformin HCl & Lisinopril due</p>\n          </div>\n          <div class=\"bg-warning/20 text-warning flex size-11 shrink-0 items-center justify-center rounded-xl\">\n            <AlertCircle class=\"size-5\" />\n          </div>\n        </CardContent>\n      </Card>\n\n      <!-- In Delivery / Transit -->\n      <Card class=\"shadow-xs sm:col-span-2 lg:col-span-1\">\n        <CardContent class=\"flex items-center justify-between p-5\">\n          <div class=\"space-y-1\">\n            <div class=\"flex items-center gap-1.5\">\n              <p class=\"text-muted-foreground text-xs font-medium\">In Delivery / Transit</p>\n              <Badge variant=\"outline\" class=\"border-info/30 bg-info/10 text-info gap-1 text-xs font-medium\">\n                <span class=\"bg-info size-1.5 animate-pulse rounded-full\" />\n                1 En Route\n              </Badge>\n            </div>\n            <div class=\"flex items-baseline gap-2\">\n              <span class=\"text-foreground text-2xl font-bold tracking-tight tabular-nums\">1</span>\n              <span class=\"text-muted-foreground text-xs\">Package tracked</span>\n            </div>\n            <p class=\"text-muted-foreground text-xs\">Atorvastatin 40mg · USPS Priority</p>\n          </div>\n          <div class=\"bg-info/10 text-info flex size-11 shrink-0 items-center justify-center rounded-xl\">\n            <Truck class=\"size-5\" />\n          </div>\n        </CardContent>\n      </Card>\n    </section>\n\n    <!-- Preferred Pharmacy Card -->\n    <Card class=\"border-border shadow-xs\">\n      <CardHeader class=\"pb-3\">\n        <div class=\"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between\">\n          <div class=\"flex items-start gap-3\">\n            <div\n              class=\"bg-muted text-foreground mt-0.5 flex size-9 shrink-0 items-center justify-center rounded-lg border\"\n            >\n              <Store class=\"text-primary size-4\" />\n            </div>\n            <div class=\"space-y-0.5\">\n              <div class=\"flex flex-wrap items-center gap-2\">\n                <CardTitle class=\"text-base font-semibold\">\n                  {{ activePharmacy.name }} · {{ activePharmacy.subtitle }}\n                </CardTitle>\n                <Badge variant=\"secondary\" class=\"gap-1 text-xs font-medium\">\n                  <CheckCircle2 class=\"text-success size-3\" />\n                  Preferred Pharmacy\n                </Badge>\n                <Badge variant=\"outline\" class=\"border-success/30 bg-success/10 text-success text-xs font-medium\">\n                  {{ activePharmacy.hours }}\n                </Badge>\n              </div>\n              <CardDescription class=\"text-xs\">\n                Default location for prescription fulfillment, drive-thru pick-ups, and transfers.\n              </CardDescription>\n            </div>\n          </div>\n\n          <Button\n            variant=\"outline\"\n            size=\"sm\"\n            class=\"shrink-0 gap-1.5 text-xs font-medium\"\n            @click=\"handleChangePharmacy\"\n          >\n            <Building2 class=\"size-3.5\" />\n            Change Pharmacy\n          </Button>\n        </div>\n      </CardHeader>\n      <Separator />\n      <CardContent class=\"pt-3\">\n        <div class=\"grid grid-cols-1 gap-3 text-xs sm:grid-cols-3\">\n          <div class=\"text-muted-foreground flex items-center gap-2\">\n            <MapPin class=\"text-primary size-3.5 shrink-0\" />\n            <span class=\"text-foreground truncate font-medium\">{{ activePharmacy.address }}</span>\n          </div>\n          <div class=\"text-muted-foreground flex items-center gap-2\">\n            <Phone class=\"text-primary size-3.5 shrink-0\" />\n            <span\n              >Phone: <strong class=\"text-foreground font-medium\">{{ activePharmacy.phone }}</strong></span\n            >\n          </div>\n          <div class=\"text-muted-foreground flex items-center gap-2\">\n            <Clock class=\"text-primary size-3.5 shrink-0\" />\n            <span>Rx Counter: <strong class=\"text-foreground font-medium\">Ready in 2 hrs</strong></span>\n          </div>\n        </div>\n      </CardContent>\n    </Card>\n\n    <!-- Prescriptions List Table Section -->\n    <PrescriptionsTable\n      :prescriptions=\"prescriptions\"\n      @refill=\"openRefillModal\"\n      @tracking=\"handleOpenTracking\"\n      @prior-auth=\"handleOpenAuthRequest\"\n      @transfer=\"handleOpenTransfer\"\n    />\n\n    <!-- Refill Request Modal / Dialog -->\n    <RefillOrderDialog\n      v-model:open=\"isRefillOpen\"\n      :prescription=\"selectedPrescription\"\n      :active-pharmacy=\"activePharmacy\"\n    />\n\n    <!-- Tracking Modal / Dialog -->\n    <TrackingDialog v-model:open=\"isTrackingOpen\" :prescription=\"trackingPrescription\" />\n\n    <!-- Transfer Prescription Modal / Dialog -->\n    <TransferDialog\n      v-model:open=\"isTransferOpen\"\n      v-model:transfer-form=\"transferForm\"\n      v-model:transfer-submitted=\"transferSubmitted\"\n      :pharmacy-name=\"activePharmacy.name\"\n    />\n\n    <!-- Change Preferred Pharmacy Modal / Dialog -->\n    <ChangePharmacyDialog\n      v-model:open=\"isChangePharmacyOpen\"\n      v-model:selected-pharmacy-id=\"tempSelectedPharmacyId\"\n      :pharmacies=\"availablePharmacies\"\n      :active-pharmacy-id=\"activePharmacy.id\"\n      @save=\"savePharmacyChange\"\n    />\n\n    <!-- Request MD Authorization Modal / Dialog -->\n    <PriorAuthDialog\n      v-model:open=\"isAuthRequestOpen\"\n      v-model:submitted=\"authRequestSubmitted\"\n      :prescription=\"authRequestedRx\"\n    />\n  </div>\n</template>\n",
      "type": "registry:block",
      "target": "~/app/components/blocks/prescription-refill-manager/PrescriptionRefillManager.vue"
    },
    {
      "path": "packages/registry-vue/blocks/prescription-refill-manager/TrackingDialog.vue",
      "content": "<script setup lang=\"ts\">\nimport { Truck } from 'lucide-vue-next'\nimport { Badge } from '@/components/ui/badge'\nimport { Button } from '@/components/ui/button'\nimport {\n  Dialog,\n  DialogContent,\n  DialogDescription,\n  DialogFooter,\n  DialogHeader,\n  DialogTitle,\n} from '@/components/ui/dialog'\nimport { cn } from '@/lib/utils'\nimport type { Prescription } from './prescription-refill-manager-types'\n\nconst open = defineModel<boolean>('open', { required: true })\n\ndefineProps<{\n  prescription: Prescription | null\n}>()\n</script>\n\n<template>\n  <!-- Tracking Modal / Dialog -->\n  <Dialog v-model:open=\"open\">\n    <DialogContent v-if=\"prescription\" class=\"sm:max-w-lg\">\n      <DialogHeader>\n        <div class=\"flex items-center gap-2\">\n          <div class=\"bg-info/10 text-info flex size-8 items-center justify-center rounded-lg\">\n            <Truck class=\"size-4\" />\n          </div>\n          <div>\n            <DialogTitle class=\"text-lg font-bold\">Delivery & Tracking Status</DialogTitle>\n            <DialogDescription class=\"text-xs\"> Tracking details for {{ prescription.name }} </DialogDescription>\n          </div>\n        </div>\n      </DialogHeader>\n\n      <div v-if=\"prescription.packageTracking\" class=\"space-y-4 py-2 text-xs\">\n        <!-- Tracking Header Banner -->\n        <div class=\"bg-muted/40 border-border space-y-2 rounded-xl border p-4\">\n          <div class=\"flex items-center justify-between\">\n            <span class=\"text-muted-foreground\">Carrier & Service:</span>\n            <strong class=\"text-foreground\">{{ prescription.packageTracking.carrier }}</strong>\n          </div>\n          <div class=\"flex items-center justify-between\">\n            <span class=\"text-muted-foreground\">Tracking Number:</span>\n            <strong class=\"text-foreground font-mono\">{{ prescription.packageTracking.trackingNumber }}</strong>\n          </div>\n          <div class=\"flex items-center justify-between\">\n            <span class=\"text-muted-foreground\">Status:</span>\n            <Badge variant=\"outline\" class=\"border-info/30 bg-info/10 text-info text-xs font-semibold\">\n              {{ prescription.packageTracking.status }}\n            </Badge>\n          </div>\n          <div class=\"flex items-center justify-between border-t pt-1\">\n            <span class=\"text-muted-foreground\">Estimated Delivery:</span>\n            <strong class=\"text-foreground font-bold\">{{ prescription.packageTracking.estimatedArrival }}</strong>\n          </div>\n        </div>\n\n        <!-- Step Timeline Tracker -->\n        <div class=\"space-y-3 pl-2\">\n          <p class=\"text-foreground text-xs font-semibold\">Package History Timeline</p>\n          <div class=\"border-border relative ml-2 space-y-4 border-l pl-4\">\n            <div v-for=\"(step, idx) in prescription.packageTracking.steps\" :key=\"idx\" class=\"relative space-y-0.5\">\n              <div\n                :class=\"\n                  cn(\n                    'ring-background absolute top-0.5 -left-[23px] flex size-3.5 items-center justify-center rounded-full ring-2',\n                    step.current\n                      ? 'bg-info ring-info animate-pulse'\n                      : step.done\n                        ? 'bg-primary text-primary-foreground'\n                        : 'bg-muted border',\n                  )\n                \"\n              />\n              <p :class=\"cn('text-xs font-semibold', step.current ? 'text-info' : 'text-foreground')\">\n                {{ step.title }}\n              </p>\n              <p class=\"text-muted-foreground text-xs tabular-nums\">{{ step.time }}</p>\n            </div>\n          </div>\n        </div>\n      </div>\n\n      <DialogFooter>\n        <Button variant=\"outline\" class=\"w-full sm:w-auto\" @click=\"open = false\"> Close Tracking </Button>\n      </DialogFooter>\n    </DialogContent>\n  </Dialog>\n</template>\n",
      "type": "registry:block",
      "target": "~/app/components/blocks/prescription-refill-manager/TrackingDialog.vue"
    },
    {
      "path": "packages/registry-vue/blocks/prescription-refill-manager/TransferDialog.vue",
      "content": "<script setup lang=\"ts\">\nimport { ArrowLeftRight, CheckCircle2 } from 'lucide-vue-next'\nimport { Button } from '@/components/ui/button'\nimport {\n  Dialog,\n  DialogContent,\n  DialogDescription,\n  DialogFooter,\n  DialogHeader,\n  DialogTitle,\n} from '@/components/ui/dialog'\nimport type { TransferFormState } from './prescription-refill-manager-types'\n\nconst open = defineModel<boolean>('open', { required: true })\nconst transferForm = defineModel<TransferFormState>('transferForm', { required: true })\nconst transferSubmitted = defineModel<boolean>('transferSubmitted', { required: true })\n\ndefineProps<{\n  pharmacyName: string\n}>()\n\nfunction submitTransfer() {\n  transferSubmitted.value = true\n}\n</script>\n\n<template>\n  <!-- Transfer Prescription Modal / Dialog -->\n  <Dialog v-model:open=\"open\">\n    <DialogContent class=\"sm:max-w-lg\">\n      <DialogHeader>\n        <div class=\"flex items-center gap-2\">\n          <div class=\"bg-primary/10 text-primary flex size-8 items-center justify-center rounded-lg\">\n            <ArrowLeftRight class=\"size-4\" />\n          </div>\n          <div>\n            <DialogTitle class=\"text-lg font-bold\">Transfer Prescription</DialogTitle>\n            <DialogDescription class=\"text-xs\">\n              Move an existing prescription from another pharmacy to {{ pharmacyName }}.\n            </DialogDescription>\n          </div>\n        </div>\n      </DialogHeader>\n\n      <div v-if=\"transferSubmitted\" class=\"space-y-4 py-4\">\n        <div class=\"border-success/30 bg-success/10 text-success space-y-2 rounded-xl border p-5 text-center\">\n          <div class=\"bg-success/20 text-success mx-auto flex size-12 items-center justify-center rounded-full\">\n            <CheckCircle2 class=\"size-6\" />\n          </div>\n          <h3 class=\"text-base font-bold\">Transfer Request Submitted!</h3>\n          <p class=\"text-success/90 mx-auto max-w-sm text-xs\">\n            Our clinical pharmacy team will contact your previous pharmacy to transfer the prescription. This typically\n            takes 24–48 hours.\n          </p>\n        </div>\n        <DialogFooter>\n          <Button variant=\"default\" class=\"w-full\" @click=\"open = false\"> Done </Button>\n        </DialogFooter>\n      </div>\n\n      <div v-else class=\"space-y-3.5 py-2 text-xs\">\n        <div class=\"space-y-1\">\n          <label class=\"text-foreground text-xs font-medium\">Current / Previous Pharmacy Name</label>\n          <input\n            v-model=\"transferForm.pharmacyName\"\n            type=\"text\"\n            placeholder=\"e.g. Walgreens, Rite Aid, Walmart...\"\n            class=\"border-input bg-background text-foreground focus-visible:ring-ring h-9 w-full rounded-md border px-3 text-xs shadow-xs focus-visible:ring-2 focus-visible:outline-none\"\n          />\n        </div>\n\n        <div class=\"grid grid-cols-1 gap-3 sm:grid-cols-2\">\n          <div class=\"space-y-1\">\n            <label class=\"text-foreground text-xs font-medium\">Pharmacy Phone Number</label>\n            <input\n              v-model=\"transferForm.phone\"\n              type=\"tel\"\n              placeholder=\"(555) 000-0000\"\n              class=\"border-input bg-background text-foreground focus-visible:ring-ring h-9 w-full rounded-md border px-3 text-xs shadow-xs focus-visible:ring-2 focus-visible:outline-none\"\n            />\n          </div>\n          <div class=\"space-y-1\">\n            <label class=\"text-foreground text-xs font-medium\">Existing Rx Number (if known)</label>\n            <input\n              v-model=\"transferForm.rxNumber\"\n              type=\"text\"\n              placeholder=\"e.g. RX-123456\"\n              class=\"border-input bg-background text-foreground focus-visible:ring-ring h-9 w-full rounded-md border px-3 font-mono text-xs shadow-xs focus-visible:ring-2 focus-visible:outline-none\"\n            />\n          </div>\n        </div>\n\n        <div class=\"space-y-1\">\n          <label class=\"text-foreground text-xs font-medium\">Medication Name & Strength</label>\n          <input\n            v-model=\"transferForm.medicationName\"\n            type=\"text\"\n            placeholder=\"e.g. Lipitor 20mg or Levothyroxine 50mcg\"\n            class=\"border-input bg-background text-foreground focus-visible:ring-ring h-9 w-full rounded-md border px-3 text-xs shadow-xs focus-visible:ring-2 focus-visible:outline-none\"\n          />\n        </div>\n\n        <div class=\"space-y-1\">\n          <label class=\"text-foreground text-xs font-medium\">Special Instructions / Prescriber Notes (Optional)</label>\n          <textarea\n            v-model=\"transferForm.notes\"\n            rows=\"2\"\n            placeholder=\"Any additional notes for the receiving pharmacist...\"\n            class=\"border-input bg-background text-foreground focus-visible:ring-ring w-full rounded-md border p-2 text-xs shadow-xs focus-visible:ring-2 focus-visible:outline-none\"\n          />\n        </div>\n\n        <DialogFooter class=\"pt-2\">\n          <Button variant=\"outline\" @click=\"open = false\">Cancel</Button>\n          <Button variant=\"default\" class=\"gap-1.5 shadow-xs\" @click=\"submitTransfer\">\n            <ArrowLeftRight class=\"size-3.5\" />\n            Initiate Transfer\n          </Button>\n        </DialogFooter>\n      </div>\n    </DialogContent>\n  </Dialog>\n</template>\n",
      "type": "registry:block",
      "target": "~/app/components/blocks/prescription-refill-manager/TransferDialog.vue"
    },
    {
      "path": "packages/registry-vue/blocks/prescription-refill-manager/ChangePharmacyDialog.vue",
      "content": "<script setup lang=\"ts\">\nimport { Building2 } from 'lucide-vue-next'\nimport { Badge } from '@/components/ui/badge'\nimport { Button } from '@/components/ui/button'\nimport {\n  Dialog,\n  DialogContent,\n  DialogDescription,\n  DialogFooter,\n  DialogHeader,\n  DialogTitle,\n} from '@/components/ui/dialog'\nimport { cn } from '@/lib/utils'\nimport type { Pharmacy } from './prescription-refill-manager-types'\n\nconst open = defineModel<boolean>('open', { required: true })\nconst selectedPharmacyId = defineModel<string>('selectedPharmacyId', { required: true })\n\ndefineProps<{\n  pharmacies: Pharmacy[]\n  activePharmacyId: string\n}>()\n\ndefineEmits<{\n  save: []\n}>()\n</script>\n\n<template>\n  <!-- Change Preferred Pharmacy Modal / Dialog -->\n  <Dialog v-model:open=\"open\">\n    <DialogContent class=\"sm:max-w-lg\">\n      <DialogHeader>\n        <div class=\"flex items-center gap-2\">\n          <div class=\"bg-primary/10 text-primary flex size-8 items-center justify-center rounded-lg\">\n            <Building2 class=\"size-4\" />\n          </div>\n          <div>\n            <DialogTitle class=\"text-lg font-bold\">Select Preferred Pharmacy</DialogTitle>\n            <DialogDescription class=\"text-xs\">\n              Choose the location where your local orders and drive-thru pickups are routed.\n            </DialogDescription>\n          </div>\n        </div>\n      </DialogHeader>\n\n      <div class=\"space-y-3 py-2 text-xs\">\n        <div\n          v-for=\"pharmacy in pharmacies\"\n          :key=\"pharmacy.id\"\n          :class=\"\n            cn(\n              'flex cursor-pointer items-start justify-between rounded-xl border p-3.5 transition-colors',\n              selectedPharmacyId === pharmacy.id\n                ? 'border-primary bg-primary/5 ring-primary ring-1'\n                : 'border-border bg-card hover:bg-muted/40',\n            )\n          \"\n          @click=\"selectedPharmacyId = pharmacy.id\"\n        >\n          <div class=\"space-y-1\">\n            <div class=\"flex items-center gap-2\">\n              <span class=\"text-foreground font-bold\">{{ pharmacy.name }}</span>\n              <Badge v-if=\"pharmacy.id === activePharmacyId\" variant=\"secondary\" class=\"text-xs\">Current</Badge>\n            </div>\n            <p class=\"text-muted-foreground\">{{ pharmacy.address }}</p>\n            <div class=\"text-muted-foreground flex items-center gap-3 pt-1\">\n              <span\n                >Phone: <strong class=\"text-foreground font-medium\">{{ pharmacy.phone }}</strong></span\n              >\n              <span>{{ pharmacy.hours }}</span>\n            </div>\n          </div>\n          <div class=\"pt-0.5\">\n            <div\n              :class=\"\n                cn(\n                  'flex size-4 items-center justify-center rounded-full border',\n                  selectedPharmacyId === pharmacy.id\n                    ? 'border-primary bg-primary text-primary-foreground'\n                    : 'border-muted-foreground/40',\n                )\n              \"\n            >\n              <div v-if=\"selectedPharmacyId === pharmacy.id\" class=\"bg-background size-1.5 rounded-full\" />\n            </div>\n          </div>\n        </div>\n      </div>\n\n      <DialogFooter class=\"pt-2\">\n        <Button variant=\"outline\" @click=\"open = false\">Cancel</Button>\n        <Button variant=\"default\" @click=\"$emit('save')\">Save Preferred Pharmacy</Button>\n      </DialogFooter>\n    </DialogContent>\n  </Dialog>\n</template>\n",
      "type": "registry:block",
      "target": "~/app/components/blocks/prescription-refill-manager/ChangePharmacyDialog.vue"
    },
    {
      "path": "packages/registry-vue/blocks/prescription-refill-manager/PriorAuthDialog.vue",
      "content": "<script setup lang=\"ts\">\nimport { Check, CheckCircle2, ShieldAlert } from 'lucide-vue-next'\nimport { Button } from '@/components/ui/button'\nimport {\n  Dialog,\n  DialogContent,\n  DialogDescription,\n  DialogFooter,\n  DialogHeader,\n  DialogTitle,\n} from '@/components/ui/dialog'\nimport type { Prescription } from './prescription-refill-manager-types'\n\nconst open = defineModel<boolean>('open', { required: true })\nconst submitted = defineModel<boolean>('submitted', { required: true })\n\ndefineProps<{\n  prescription: Prescription | null\n}>()\n</script>\n\n<template>\n  <!-- Request MD Authorization Modal / Dialog -->\n  <Dialog v-model:open=\"open\">\n    <DialogContent v-if=\"prescription\" class=\"sm:max-w-md\">\n      <DialogHeader>\n        <div class=\"flex items-center gap-2\">\n          <div class=\"bg-destructive/10 text-destructive flex size-8 items-center justify-center rounded-lg\">\n            <ShieldAlert class=\"size-4\" />\n          </div>\n          <div>\n            <DialogTitle class=\"text-lg font-bold\">Request Prescriber Authorization</DialogTitle>\n            <DialogDescription class=\"text-xs\"> Renew zero-refill prescription with your physician. </DialogDescription>\n          </div>\n        </div>\n      </DialogHeader>\n\n      <div v-if=\"submitted\" class=\"space-y-3 py-4 text-center\">\n        <div class=\"bg-success/20 text-success mx-auto flex size-12 items-center justify-center rounded-full\">\n          <CheckCircle2 class=\"size-6\" />\n        </div>\n        <h3 class=\"text-foreground text-sm font-bold\">Authorization Request Sent!</h3>\n        <p class=\"text-muted-foreground text-xs\">\n          A renewal request for <strong>{{ prescription.name }}</strong> has been electronically transmitted to\n          <strong>{{ prescription.prescriber.name }}</strong\n          >.\n        </p>\n        <DialogFooter class=\"pt-2\">\n          <Button variant=\"default\" class=\"w-full\" @click=\"open = false\">Done</Button>\n        </DialogFooter>\n      </div>\n\n      <div v-else class=\"space-y-4 py-2 text-xs\">\n        <div class=\"bg-muted/40 space-y-1.5 rounded-xl border p-3.5\">\n          <p class=\"text-foreground font-bold\">{{ prescription.name }}</p>\n          <p class=\"text-muted-foreground\">{{ prescription.genericFor }}</p>\n          <p class=\"text-muted-foreground\">\n            Prescribing Physician: <strong class=\"text-foreground\">{{ prescription.prescriber.name }}</strong>\n          </p>\n          <p class=\"text-muted-foreground\">\n            Clinic: {{ prescription.prescriber.clinic }} ({{ prescription.prescriber.phone }})\n          </p>\n        </div>\n\n        <p class=\"text-muted-foreground leading-relaxed\">\n          Because this prescription has 0 refills remaining, we will send an electronic request (e-Prescription Renewal)\n          directly to your doctor's office.\n        </p>\n\n        <DialogFooter>\n          <Button variant=\"outline\" @click=\"open = false\">Cancel</Button>\n          <Button variant=\"default\" class=\"gap-1.5\" @click=\"submitted = true\">\n            <Check class=\"size-3.5\" />\n            Send Renewal Request\n          </Button>\n        </DialogFooter>\n      </div>\n    </DialogContent>\n  </Dialog>\n</template>\n",
      "type": "registry:block",
      "target": "~/app/components/blocks/prescription-refill-manager/PriorAuthDialog.vue"
    },
    {
      "path": "packages/registry-vue/blocks/prescription-refill-manager/RefillOrderDialog.vue",
      "content": "<script setup lang=\"ts\">\nimport { computed, ref, watch } from 'vue'\nimport { Check, CheckCircle2, RefreshCw, Store, Truck } from 'lucide-vue-next'\nimport { Badge } from '@/components/ui/badge'\nimport { Button } from '@/components/ui/button'\nimport {\n  Dialog,\n  DialogContent,\n  DialogDescription,\n  DialogFooter,\n  DialogHeader,\n  DialogTitle,\n} from '@/components/ui/dialog'\nimport { RadioGroup, RadioGroupItem } from '@/components/ui/radio-group'\nimport { Separator } from '@/components/ui/separator'\nimport { cn } from '@/lib/utils'\nimport type { Pharmacy, Prescription } from './prescription-refill-manager-types'\n\nconst props = defineProps<{\n  open: boolean\n  prescription: Prescription\n  activePharmacy: Pharmacy\n}>()\n\nconst emit = defineEmits<{\n  'update:open': [value: boolean]\n  submit: [details: { prescriptionId: string; supplyDuration: '30' | '90'; deliveryMethod: 'pickup' | 'delivery' }]\n}>()\n\nconst supplyDuration = ref<'30' | '90'>('90')\nconst deliveryMethod = ref<'pickup' | 'delivery'>('delivery')\nconst orderSubmitted = ref(false)\n\nwatch(\n  () => props.open,\n  (isOpen) => {\n    if (isOpen) {\n      orderSubmitted.value = false\n    }\n  },\n)\n\nconst estimatedCopay = computed(() => {\n  if (supplyDuration.value === '90') {\n    return 20.0\n  }\n  return props.prescription.copayEst\n})\n\nconst estimatedInsuranceSavings = computed(() => {\n  if (supplyDuration.value === '90') {\n    return 75.0\n  }\n  return 35.0\n})\n\nfunction handleSubmit() {\n  orderSubmitted.value = true\n  emit('submit', {\n    prescriptionId: props.prescription.id,\n    supplyDuration: supplyDuration.value,\n    deliveryMethod: deliveryMethod.value,\n  })\n}\n</script>\n\n<template>\n  <Dialog :open=\"open\" @update:open=\"emit('update:open', $event)\">\n    <DialogContent class=\"sm:max-w-xl\">\n      <DialogHeader>\n        <div class=\"flex items-center gap-2\">\n          <div class=\"bg-primary/10 text-primary flex size-8 items-center justify-center rounded-lg\">\n            <RefreshCw class=\"size-4\" />\n          </div>\n          <div>\n            <DialogTitle class=\"text-lg font-bold\">Request Prescription Refill</DialogTitle>\n            <DialogDescription class=\"text-xs\">\n              Select your supply duration, delivery method, and confirm your copay.\n            </DialogDescription>\n          </div>\n        </div>\n      </DialogHeader>\n\n      <!-- If order submitted success view -->\n      <div v-if=\"orderSubmitted\" class=\"space-y-4 py-4\">\n        <div class=\"border-success/30 bg-success/10 text-success space-y-2 rounded-xl border p-5 text-center\">\n          <div class=\"bg-success/20 text-success mx-auto flex size-12 items-center justify-center rounded-full\">\n            <CheckCircle2 class=\"size-6\" />\n          </div>\n          <h3 class=\"text-base font-bold\">Refill Order Successfully Placed!</h3>\n          <p class=\"text-success/90 mx-auto max-w-md text-xs\">\n            Your order for <strong>{{ prescription.name }}</strong> ({{ supplyDuration }}-day supply) has been sent to\n            {{ activePharmacy.name }}.\n          </p>\n          <p class=\"pt-1 font-mono text-xs font-medium\">\n            Order Ref: #ORD-{{ Math.floor(100000 + Math.random() * 900000) }}\n          </p>\n        </div>\n\n        <div class=\"bg-muted/40 text-muted-foreground space-y-1.5 rounded-lg border p-3 text-xs\">\n          <div class=\"flex justify-between\">\n            <span>Fulfillment Method:</span>\n            <strong class=\"text-foreground\">{{\n              deliveryMethod === 'delivery' ? 'Express Home Delivery (1-2 Days)' : 'In-Store Pickup'\n            }}</strong>\n          </div>\n          <div class=\"flex justify-between\">\n            <span>Estimated Copay:</span>\n            <strong class=\"text-foreground font-mono tabular-nums\">${{ estimatedCopay.toFixed(2) }}</strong>\n          </div>\n          <div class=\"flex justify-between\">\n            <span>Remaining Refills After This Order:</span>\n            <strong class=\"text-foreground tabular-nums\">{{ Math.max(0, prescription.refillsRemaining - 1) }}</strong>\n          </div>\n        </div>\n\n        <DialogFooter class=\"pt-2\">\n          <Button variant=\"default\" class=\"w-full\" @click=\"emit('update:open', false)\">\n            Done & Return to Prescriptions\n          </Button>\n        </DialogFooter>\n      </div>\n\n      <!-- Form view -->\n      <div v-else class=\"space-y-5 py-2\">\n        <!-- Medication Selector / Summary Box -->\n        <div class=\"bg-muted/40 border-border space-y-3 rounded-xl border p-4\">\n          <div class=\"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between\">\n            <div class=\"space-y-0.5\">\n              <p class=\"text-muted-foreground text-xs font-semibold\">Selected Prescription</p>\n              <h4 class=\"text-foreground text-sm font-bold\">{{ prescription.name }}</h4>\n              <p class=\"text-muted-foreground text-xs\">{{ prescription.genericFor }}</p>\n            </div>\n            <div class=\"space-y-0.5 text-left sm:text-right\">\n              <span class=\"bg-background rounded border px-2 py-0.5 font-mono text-xs font-medium\">\n                {{ prescription.rxNumber }}\n              </span>\n              <p class=\"text-success text-xs font-medium\">{{ prescription.refillsRemaining }} refills remaining</p>\n            </div>\n          </div>\n\n          <div class=\"text-muted-foreground flex items-center justify-between border-t pt-2.5 text-xs\">\n            <span>\n              Prescriber:\n              <strong class=\"text-foreground font-medium\">{{ prescription.prescriber.name }}</strong>\n            </span>\n            <span>\n              Directions:\n              <strong class=\"text-foreground font-medium\">{{ prescription.instructions }}</strong>\n            </span>\n          </div>\n        </div>\n\n        <!-- Quantity / Supply Selector -->\n        <div class=\"space-y-2.5\">\n          <label class=\"text-foreground flex items-center justify-between text-xs font-semibold\">\n            <span>Choose Supply Quantity</span>\n            <span class=\"text-muted-foreground font-normal\">Insurance Tier 1 Preferred</span>\n          </label>\n\n          <div class=\"grid grid-cols-1 gap-3 sm:grid-cols-2\">\n            <!-- 30-Day Supply Option -->\n            <button\n              type=\"button\"\n              :class=\"\n                cn(\n                  'flex cursor-pointer flex-col items-start rounded-xl border p-3.5 text-left transition-colors duration-150',\n                  supplyDuration === '30'\n                    ? 'border-primary bg-primary/5 ring-primary ring-1'\n                    : 'border-border bg-card hover:bg-muted/50',\n                )\n              \"\n              @click=\"supplyDuration = '30'\"\n            >\n              <div class=\"mb-1 flex w-full items-center justify-between\">\n                <span class=\"text-foreground text-xs font-bold\">30-Day Supply</span>\n                <span class=\"text-foreground font-mono text-xs font-bold tabular-nums\">$10.00</span>\n              </div>\n              <p class=\"text-muted-foreground text-xs\">Standard monthly bottle (30 tablets)</p>\n              <span class=\"text-muted-foreground mt-2 text-xs\">Local pickup or standard mail</span>\n            </button>\n\n            <!-- 90-Day Supply Option (Recommended) -->\n            <button\n              type=\"button\"\n              :class=\"\n                cn(\n                  'relative flex cursor-pointer flex-col items-start rounded-xl border p-3.5 text-left transition-colors duration-150',\n                  supplyDuration === '90'\n                    ? 'border-primary bg-primary/5 ring-primary ring-1'\n                    : 'border-border bg-card hover:bg-muted/50',\n                )\n              \"\n              @click=\"supplyDuration = '90'\"\n            >\n              <div class=\"mb-1 flex w-full items-center justify-between\">\n                <span class=\"text-foreground text-xs font-bold\">90-Day Mail Order</span>\n                <span class=\"text-foreground font-mono text-xs font-bold tabular-nums\">$20.00</span>\n              </div>\n              <p class=\"text-muted-foreground text-xs\">3-Month Supply (90 tablets)</p>\n              <Badge variant=\"outline\" class=\"border-success/40 bg-success/10 text-success mt-2 text-xs font-semibold\">\n                Save $10 on Copay\n              </Badge>\n            </button>\n          </div>\n        </div>\n\n        <!-- Delivery Method Selector -->\n        <div class=\"space-y-2.5\">\n          <label class=\"text-foreground text-xs font-semibold\">Select Delivery & Fulfillment Method</label>\n\n          <RadioGroup v-model=\"deliveryMethod\" class=\"gap-2.5\">\n            <!-- Free Express Home Delivery -->\n            <label\n              :class=\"\n                cn(\n                  'flex cursor-pointer items-start gap-3 rounded-xl border p-3 transition-colors',\n                  deliveryMethod === 'delivery'\n                    ? 'border-primary bg-primary/5 ring-primary ring-1'\n                    : 'border-border bg-card hover:bg-muted/30',\n                )\n              \"\n            >\n              <RadioGroupItem value=\"delivery\" id=\"delivery-option\" class=\"mt-0.5\" />\n              <div class=\"flex-1 space-y-0.5\">\n                <div class=\"flex items-center justify-between\">\n                  <span class=\"text-foreground flex items-center gap-1.5 text-xs font-bold\">\n                    <Truck class=\"text-primary size-3.5\" />\n                    Free Express Home Delivery\n                  </span>\n                  <Badge variant=\"outline\" class=\"border-primary/30 bg-primary/10 text-primary text-xs\">\n                    FREE 2-Day\n                  </Badge>\n                </div>\n                <p class=\"text-muted-foreground text-xs\">\n                  Ships to: <strong>1420 Ocean Ave, Apt 4B, Santa Monica, CA</strong>\n                </p>\n                <p class=\"text-muted-foreground text-xs\">Estimated arrival in 1–2 business days via USPS Priority</p>\n              </div>\n            </label>\n\n            <!-- Pharmacy Pickup -->\n            <label\n              :class=\"\n                cn(\n                  'flex cursor-pointer items-start gap-3 rounded-xl border p-3 transition-colors',\n                  deliveryMethod === 'pickup'\n                    ? 'border-primary bg-primary/5 ring-primary ring-1'\n                    : 'border-border bg-card hover:bg-muted/30',\n                )\n              \"\n            >\n              <RadioGroupItem value=\"pickup\" id=\"pickup-option\" class=\"mt-0.5\" />\n              <div class=\"flex-1 space-y-0.5\">\n                <div class=\"flex items-center justify-between\">\n                  <span class=\"text-foreground flex items-center gap-1.5 text-xs font-bold\">\n                    <Store class=\"text-primary size-3.5\" />\n                    In-Store / Drive-Thru Pickup\n                  </span>\n                  <span class=\"text-success text-xs font-bold\">Ready Today</span>\n                </div>\n                <p class=\"text-muted-foreground text-xs\">{{ activePharmacy.name }} · {{ activePharmacy.address }}</p>\n                <p class=\"text-muted-foreground text-xs\">\n                  Ready for pickup in ~2 hours. 24-Hour drive-thru accessible.\n                </p>\n              </div>\n            </label>\n          </RadioGroup>\n        </div>\n\n        <!-- Copay and Cost Breakdown -->\n        <div class=\"bg-muted/50 space-y-2 rounded-xl border p-3.5 text-xs\">\n          <div class=\"text-muted-foreground flex justify-between\">\n            <span>Medication Retail Cost:</span>\n            <span class=\"font-mono tabular-nums line-through\"\n              >${{ (estimatedCopay + estimatedInsuranceSavings).toFixed(2) }}</span\n            >\n          </div>\n          <div class=\"text-success flex justify-between\">\n            <span>Insurance Coverage (Aetna Choice POS II):</span>\n            <span class=\"font-mono tabular-nums\">-${{ estimatedInsuranceSavings.toFixed(2) }}</span>\n          </div>\n          <div class=\"text-muted-foreground flex justify-between\">\n            <span>Shipping & Handling:</span>\n            <span class=\"text-success font-medium\">FREE</span>\n          </div>\n          <Separator />\n          <div class=\"text-foreground flex items-center justify-between pt-0.5 text-sm font-bold\">\n            <span>Estimated Out-of-Pocket:</span>\n            <span class=\"text-primary font-mono text-base tabular-nums\">${{ estimatedCopay.toFixed(2) }}</span>\n          </div>\n        </div>\n\n        <DialogFooter class=\"flex items-center justify-between gap-2 pt-2 sm:justify-end\">\n          <Button variant=\"outline\" @click=\"emit('update:open', false)\">Cancel</Button>\n          <Button variant=\"default\" class=\"gap-1.5 shadow-xs\" @click=\"handleSubmit\">\n            <Check class=\"size-4\" />\n            Submit Refill Order\n          </Button>\n        </DialogFooter>\n      </div>\n    </DialogContent>\n  </Dialog>\n</template>\n",
      "type": "registry:block",
      "target": "~/app/components/blocks/prescription-refill-manager/RefillOrderDialog.vue"
    },
    {
      "path": "packages/registry-vue/blocks/prescription-refill-manager/PrescriptionsTable.vue",
      "content": "<script setup lang=\"ts\">\nimport { computed, ref } from 'vue'\nimport {\n  AlertCircle,\n  ArrowLeftRight,\n  Calendar,\n  Clock,\n  FileText,\n  Info,\n  MoreHorizontal,\n  Phone,\n  RefreshCw,\n  Search,\n  ShieldAlert,\n  Truck,\n} from 'lucide-vue-next'\nimport { Badge } from '@/components/ui/badge'\nimport { Button } from '@/components/ui/button'\nimport { Card, CardDescription, CardFooter, CardHeader, CardTitle } from '@/components/ui/card'\nimport {\n  DropdownMenu,\n  DropdownMenuContent,\n  DropdownMenuItem,\n  DropdownMenuLabel,\n  DropdownMenuSeparator,\n  DropdownMenuTrigger,\n} from '@/components/ui/dropdown-menu'\nimport { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@/components/ui/table'\nimport { cn } from '@/lib/utils'\nimport type { Prescription } from './prescription-refill-manager-types'\n\nconst props = defineProps<{\n  prescriptions: Prescription[]\n}>()\n\nconst emit = defineEmits<{\n  refill: [rxId: string]\n  tracking: [rx: Prescription]\n  priorAuth: [rx: Prescription]\n  transfer: []\n}>()\n\nconst searchQuery = ref('')\nconst statusFilter = ref<'all' | 'ready' | 'needs_auth' | 'in_transit'>('all')\n\nconst filteredPrescriptions = computed(() => {\n  return props.prescriptions.filter((rx) => {\n    const matchesSearch =\n      rx.name.toLowerCase().includes(searchQuery.value.toLowerCase()) ||\n      rx.rxNumber.toLowerCase().includes(searchQuery.value.toLowerCase()) ||\n      rx.genericFor.toLowerCase().includes(searchQuery.value.toLowerCase()) ||\n      rx.prescriber.name.toLowerCase().includes(searchQuery.value.toLowerCase())\n\n    if (!matchesSearch) return false\n\n    if (statusFilter.value === 'all') return true\n    return rx.status === statusFilter.value\n  })\n})\n</script>\n\n<template>\n  <Card class=\"border-border shadow-xs\">\n    <CardHeader class=\"pb-3\">\n      <div class=\"flex flex-col gap-4 md:flex-row md:items-center md:justify-between\">\n        <div>\n          <CardTitle class=\"text-lg font-bold\">Active Prescriptions ({{ filteredPrescriptions.length }})</CardTitle>\n          <CardDescription class=\"text-xs\">\n            Review remaining refills, dosage instructions, and ordering eligibility.\n          </CardDescription>\n        </div>\n\n        <!-- Search and Filter Bar -->\n        <div class=\"flex flex-wrap items-center gap-2\">\n          <div class=\"relative w-full sm:w-64\">\n            <Search class=\"text-muted-foreground absolute top-1/2 left-2.5 size-3.5 -translate-y-1/2\" />\n            <input\n              v-model=\"searchQuery\"\n              type=\"text\"\n              placeholder=\"Search medication, Rx#, doctor...\"\n              class=\"border-input bg-background text-foreground focus-visible:ring-ring h-8 w-full rounded-md border pr-3 pl-8 text-xs shadow-xs focus-visible:ring-2 focus-visible:outline-none\"\n            />\n          </div>\n\n          <div class=\"flex items-center gap-1\">\n            <Button\n              variant=\"ghost\"\n              size=\"sm\"\n              :class=\"cn('h-8 text-xs font-medium', statusFilter === 'all' && 'bg-accent text-accent-foreground')\"\n              @click=\"statusFilter = 'all'\"\n            >\n              All ({{ prescriptions.length }})\n            </Button>\n            <Button\n              variant=\"ghost\"\n              size=\"sm\"\n              :class=\"\n                cn(\n                  'h-8 text-xs font-medium',\n                  statusFilter === 'ready' && 'bg-accent text-accent-foreground text-warning',\n                )\n              \"\n              @click=\"statusFilter = 'ready'\"\n            >\n              Ready for Refill (2)\n            </Button>\n            <Button\n              variant=\"ghost\"\n              size=\"sm\"\n              :class=\"\n                cn('h-8 text-xs font-medium', statusFilter === 'in_transit' && 'bg-accent text-accent-foreground')\n              \"\n              @click=\"statusFilter = 'in_transit'\"\n            >\n              In Transit (1)\n            </Button>\n            <Button\n              variant=\"ghost\"\n              size=\"sm\"\n              :class=\"\n                cn(\n                  'h-8 text-xs font-medium',\n                  statusFilter === 'needs_auth' && 'bg-accent text-accent-foreground text-destructive',\n                )\n              \"\n              @click=\"statusFilter = 'needs_auth'\"\n            >\n              Needs Auth (1)\n            </Button>\n          </div>\n        </div>\n      </div>\n    </CardHeader>\n\n    <div class=\"overflow-x-auto\">\n      <Table>\n        <TableHeader>\n          <TableRow class=\"hover:bg-transparent\">\n            <TableHead class=\"min-w-[220px] text-xs font-semibold\">Medication & Rx#</TableHead>\n            <TableHead class=\"min-w-[240px] text-xs font-semibold\">Directions & Dosage</TableHead>\n            <TableHead class=\"min-w-[170px] text-xs font-semibold\">Refill Status</TableHead>\n            <TableHead class=\"min-w-[160px] text-xs font-semibold\">Fill Dates / Schedule</TableHead>\n            <TableHead class=\"min-w-[180px] text-xs font-semibold\">Prescribing Doctor</TableHead>\n            <TableHead class=\"min-w-[150px] text-right text-xs font-semibold\">Quick Action</TableHead>\n          </TableRow>\n        </TableHeader>\n        <TableBody>\n          <TableRow\n            v-for=\"rx in filteredPrescriptions\"\n            :key=\"rx.id\"\n            :class=\"cn('transition-colors', rx.status === 'ready' && 'bg-warning/[0.02] bg-warning/[0.04]')\"\n          >\n            <!-- Medication Name & Rx# -->\n            <TableCell class=\"py-4 align-top\">\n              <div class=\"space-y-1\">\n                <div class=\"flex items-center gap-1.5\">\n                  <span class=\"text-foreground text-sm font-semibold\">{{ rx.name }}</span>\n                </div>\n                <p class=\"text-muted-foreground text-xs\">{{ rx.genericFor }}</p>\n                <div class=\"flex items-center gap-2 pt-0.5\">\n                  <span class=\"bg-muted text-muted-foreground rounded px-1.5 py-0.5 font-mono text-xs font-medium\">\n                    {{ rx.rxNumber }}\n                  </span>\n                  <span class=\"text-muted-foreground text-xs\">NDC: {{ rx.ndc }}</span>\n                </div>\n              </div>\n            </TableCell>\n\n            <!-- Directions & Dosage -->\n            <TableCell class=\"py-4 align-top\">\n              <div class=\"space-y-1\">\n                <p class=\"text-foreground text-xs leading-relaxed font-medium\">\n                  {{ rx.instructions }}\n                </p>\n                <p class=\"text-muted-foreground text-xs\">\n                  Form: <span class=\"text-foreground font-medium\">{{ rx.dosageForm }}</span> · Qty:\n                  <span class=\"font-mono tabular-nums\">{{ rx.daysSupply }} Days</span>\n                </p>\n              </div>\n            </TableCell>\n\n            <!-- Refill Status Badge -->\n            <TableCell class=\"py-4 align-top\">\n              <div class=\"space-y-1.5\">\n                <div v-if=\"rx.status === 'ready'\">\n                  <Badge\n                    variant=\"outline\"\n                    class=\"border-warning/40 bg-warning/10 text-warning gap-1 text-xs font-medium\"\n                  >\n                    <AlertCircle class=\"size-3\" />\n                    {{ rx.refillsRemaining }} refills remaining\n                  </Badge>\n                </div>\n                <div v-else-if=\"rx.status === 'needs_auth'\">\n                  <Badge\n                    variant=\"destructive\"\n                    class=\"bg-destructive/15 text-destructive dark:text-destructive-foreground dark:bg-destructive/30 gap-1 border-transparent text-xs font-medium\"\n                  >\n                    <ShieldAlert class=\"size-3\" />\n                    0 refills - Needs MD authorization\n                  </Badge>\n                </div>\n                <div v-else-if=\"rx.status === 'in_transit'\">\n                  <Badge variant=\"outline\" class=\"border-info/30 bg-info/10 text-info gap-1 text-xs font-medium\">\n                    <Truck class=\"size-3\" />\n                    In Transit · Est. Arrival Today\n                  </Badge>\n                </div>\n                <div v-else>\n                  <Badge variant=\"secondary\" class=\"text-xs font-medium\">\n                    {{ rx.refillsRemaining }} of {{ rx.totalRefills }} remaining\n                  </Badge>\n                </div>\n\n                <p class=\"text-muted-foreground text-xs tabular-nums\">\n                  Est. Copay: <strong class=\"text-foreground\">${{ rx.copayEst }}.00</strong>\n                </p>\n              </div>\n            </TableCell>\n\n            <!-- Fill Dates / Schedule -->\n            <TableCell class=\"py-4 align-top text-xs\">\n              <div class=\"space-y-1\">\n                <div class=\"text-muted-foreground flex items-center gap-1.5\">\n                  <Calendar class=\"size-3 shrink-0\" />\n                  <span>\n                    Last Filled:\n                    <strong class=\"text-foreground font-medium tabular-nums\">{{ rx.lastFilledDate }}</strong>\n                  </span>\n                </div>\n                <div\n                  :class=\"\n                    cn(\n                      'flex items-center gap-1.5 font-medium tabular-nums',\n                      rx.isDue ? 'text-warning font-semibold' : 'text-muted-foreground',\n                    )\n                  \"\n                >\n                  <Clock class=\"size-3 shrink-0\" />\n                  <span>Next Due: {{ rx.nextDueDate }}</span>\n                </div>\n                <span v-if=\"rx.isDue\" class=\"text-warning inline-block text-xs font-medium\"> Refill window open </span>\n              </div>\n            </TableCell>\n\n            <!-- Prescribing Doctor -->\n            <TableCell class=\"py-4 align-top text-xs\">\n              <div class=\"space-y-0.5\">\n                <p class=\"text-foreground font-medium\">{{ rx.prescriber.name }}</p>\n                <p class=\"text-muted-foreground\">{{ rx.prescriber.specialty }}</p>\n                <p class=\"text-muted-foreground truncate text-xs\">{{ rx.prescriber.clinic }}</p>\n              </div>\n            </TableCell>\n\n            <!-- Quick Action & Dropdown Menu -->\n            <TableCell class=\"py-4 text-right align-top\">\n              <div class=\"flex items-center justify-end gap-1.5\">\n                <!-- Ready state: Order Refill Button -->\n                <template v-if=\"rx.status === 'ready'\">\n                  <Button\n                    variant=\"default\"\n                    size=\"sm\"\n                    class=\"h-8 gap-1 text-xs font-medium shadow-xs\"\n                    @click=\"emit('refill', rx.id)\"\n                  >\n                    <RefreshCw class=\"size-3\" />\n                    Order Refill\n                  </Button>\n                </template>\n\n                <!-- Needs Auth State: Request MD Auth -->\n                <template v-else-if=\"rx.status === 'needs_auth'\">\n                  <Button\n                    variant=\"outline\"\n                    size=\"sm\"\n                    class=\"border-destructive/30 text-destructive hover:bg-destructive/10 h-8 gap-1 text-xs font-medium\"\n                    @click=\"emit('priorAuth', rx)\"\n                  >\n                    <Clock class=\"size-3\" />\n                    Request Auth\n                  </Button>\n                </template>\n\n                <!-- In Transit State: Track Package -->\n                <template v-else-if=\"rx.status === 'in_transit'\">\n                  <Button\n                    variant=\"secondary\"\n                    size=\"sm\"\n                    class=\"h-8 gap-1 text-xs font-medium\"\n                    @click=\"emit('tracking', rx)\"\n                  >\n                    <Truck class=\"text-info size-3\" />\n                    Track\n                  </Button>\n                </template>\n\n                <!-- Row Dropdown Menu -->\n                <DropdownMenu>\n                  <DropdownMenuTrigger as-child>\n                    <Button variant=\"ghost\" size=\"icon\" class=\"size-8\" aria-label=\"Prescription options\">\n                      <MoreHorizontal class=\"size-4\" />\n                    </Button>\n                  </DropdownMenuTrigger>\n                  <DropdownMenuContent align=\"end\" class=\"w-52\">\n                    <DropdownMenuLabel class=\"text-xs font-semibold\">Rx Options</DropdownMenuLabel>\n                    <DropdownMenuSeparator />\n                    <DropdownMenuItem v-if=\"rx.status === 'ready'\" class=\"gap-2 text-xs\" @click=\"emit('refill', rx.id)\">\n                      <RefreshCw class=\"text-primary size-3.5\" />\n                      Order Refill (30/90 Days)\n                    </DropdownMenuItem>\n                    <DropdownMenuItem\n                      v-if=\"rx.status === 'needs_auth'\"\n                      class=\"text-destructive gap-2 text-xs\"\n                      @click=\"emit('priorAuth', rx)\"\n                    >\n                      <ShieldAlert class=\"size-3.5\" />\n                      Request MD Renewal\n                    </DropdownMenuItem>\n                    <DropdownMenuItem v-if=\"rx.packageTracking\" class=\"gap-2 text-xs\" @click=\"emit('tracking', rx)\">\n                      <Truck class=\"text-info size-3.5\" />\n                      Track USPS Delivery\n                    </DropdownMenuItem>\n                    <DropdownMenuItem class=\"gap-2 text-xs\" @click=\"emit('transfer')\">\n                      <ArrowLeftRight class=\"size-3.5\" />\n                      Transfer to Another Pharmacy\n                    </DropdownMenuItem>\n                    <DropdownMenuSeparator />\n                    <DropdownMenuItem class=\"gap-2 text-xs\">\n                      <FileText class=\"text-muted-foreground size-3.5\" />\n                      View Full Drug Monograph\n                    </DropdownMenuItem>\n                    <DropdownMenuItem class=\"gap-2 text-xs\">\n                      <Phone class=\"text-muted-foreground size-3.5\" />\n                      Call Prescriber ({{ rx.prescriber.phone }})\n                    </DropdownMenuItem>\n                  </DropdownMenuContent>\n                </DropdownMenu>\n              </div>\n            </TableCell>\n          </TableRow>\n        </TableBody>\n      </Table>\n    </div>\n\n    <CardFooter\n      class=\"bg-muted/30 border-border text-muted-foreground flex flex-col justify-between gap-3 border-t p-4 text-xs sm:flex-row sm:items-center\"\n    >\n      <div class=\"flex items-center gap-2\">\n        <Info class=\"text-primary size-3.5 shrink-0\" />\n        <span>Refills requested before 3:00 PM are processed same-day by our clinical pharmacy team.</span>\n      </div>\n      <div class=\"flex items-center gap-3\">\n        <span>Automatic Refill Program: <strong class=\"text-foreground font-medium\">Enabled</strong></span>\n      </div>\n    </CardFooter>\n  </Card>\n</template>\n",
      "type": "registry:block",
      "target": "~/app/components/blocks/prescription-refill-manager/PrescriptionsTable.vue"
    },
    {
      "path": "packages/registry-vue/blocks/prescription-refill-manager/prescription-refill-manager-data.ts",
      "content": "import type { Pharmacy, Prescription } from './prescription-refill-manager-types'\n\nexport const defaultPrescriptions: Prescription[] = [\n  {\n    id: 'rx-1',\n    rxNumber: 'RX-849201',\n    name: 'Metformin HCl 500mg',\n    genericFor: 'Generic for Glucophage',\n    dosageForm: 'Oral Tablet',\n    instructions: 'Take 1 tablet by mouth twice daily with meals',\n    refillsRemaining: 2,\n    totalRefills: 5,\n    lastFilledDate: 'Jul 24, 2026',\n    nextDueDate: 'Aug 24, 2026',\n    isDue: true,\n    prescriber: {\n      name: 'Dr. Emily Vance, MD',\n      specialty: 'Internal Medicine',\n      clinic: 'Wilshire Medical Center',\n      phone: '(310) 555-0142',\n    },\n    status: 'ready',\n    daysSupply: 30,\n    copayEst: 10,\n    ndc: '50090-0819-0',\n  },\n  {\n    id: 'rx-2',\n    rxNumber: 'RX-849202',\n    name: 'Lisinopril 20mg',\n    genericFor: 'Generic for Prinivil / Zestril',\n    dosageForm: 'Oral Tablet',\n    instructions: 'Take 1 tablet by mouth daily in the morning',\n    refillsRemaining: 3,\n    totalRefills: 6,\n    lastFilledDate: 'Jul 10, 2026',\n    nextDueDate: 'Aug 10, 2026',\n    isDue: true,\n    prescriber: {\n      name: 'Dr. Marcus Chen, MD',\n      specialty: 'Cardiology',\n      clinic: 'Pacific Heart & Vascular Institute',\n      phone: '(310) 555-0188',\n    },\n    status: 'ready',\n    daysSupply: 30,\n    copayEst: 10,\n    ndc: '68180-0518-01',\n  },\n  {\n    id: 'rx-3',\n    rxNumber: 'RX-774920',\n    name: 'Albuterol HFA Inhaler',\n    genericFor: 'ProAir HFA 90mcg Inhalation Aerosol',\n    dosageForm: 'Inhalation Aerosol (8.5g canister)',\n    instructions: 'Inhale 2 puffs every 4-6 hours as needed for wheezing or shortness of breath',\n    refillsRemaining: 0,\n    totalRefills: 3,\n    lastFilledDate: 'Jun 15, 2026',\n    nextDueDate: 'Aug 18, 2026',\n    isDue: false,\n    prescriber: {\n      name: 'Dr. Sarah Lin, MD',\n      specialty: 'Pulmonology',\n      clinic: 'Westside Respiratory Clinic',\n      phone: '(310) 555-0195',\n    },\n    status: 'needs_auth',\n    daysSupply: 30,\n    copayEst: 15,\n    ndc: '59310-0579-22',\n  },\n  {\n    id: 'rx-4',\n    rxNumber: 'RX-910384',\n    name: 'Atorvastatin Calcium 40mg',\n    genericFor: 'Generic for Lipitor',\n    dosageForm: 'Oral Tablet',\n    instructions: 'Take 1 tablet by mouth once daily at bedtime',\n    refillsRemaining: 1,\n    totalRefills: 4,\n    lastFilledDate: 'Aug 19, 2026',\n    nextDueDate: 'Nov 19, 2026',\n    isDue: false,\n    prescriber: {\n      name: 'Dr. Marcus Chen, MD',\n      specialty: 'Cardiology',\n      clinic: 'Pacific Heart & Vascular Institute',\n      phone: '(310) 555-0188',\n    },\n    status: 'in_transit',\n    daysSupply: 90,\n    copayEst: 20,\n    ndc: '00071-0157-23',\n    packageTracking: {\n      carrier: 'USPS Priority Rx Express',\n      trackingNumber: '9400 1118 9956 2831 4092 11',\n      status: 'Out for Delivery',\n      estimatedArrival: 'Today by 6:00 PM',\n      steps: [\n        { title: 'Prescription Refill Ordered', time: 'Aug 19, 9:30 AM', done: true },\n        { title: 'Verified & Dispensed by Pharmacist', time: 'Aug 19, 2:15 PM', done: true },\n        { title: 'Shipped from Regional Fulfillment', time: 'Aug 20, 8:00 AM', done: true },\n        { title: 'Out for Delivery', time: 'Aug 21, 8:45 AM', done: true, current: true },\n      ],\n    },\n  },\n]\n\nexport const defaultAvailablePharmacies: Pharmacy[] = [\n  {\n    id: 'cvs-4829',\n    name: 'CVS Pharmacy #4829',\n    subtitle: '24-Hour Drive-Thru',\n    address: '4500 Wilshire Blvd, Los Angeles, CA 90010',\n    phone: '(213) 555-0198',\n    fax: '(213) 555-0199',\n    hours: 'Open 24 Hours · Drive-Thru Open',\n    isDriveThru: true,\n  },\n  {\n    id: 'walgreens-1204',\n    name: 'Walgreens Pharmacy #1204',\n    subtitle: 'Full Service Pharmacy',\n    address: '3724 W Olympic Blvd, Los Angeles, CA 90019',\n    phone: '(323) 555-0144',\n    fax: '(323) 555-0145',\n    hours: 'Mon-Sun: 8:00 AM – 10:00 PM',\n    isDriveThru: false,\n  },\n  {\n    id: 'kaiser-sunset',\n    name: 'Kaiser Sunset Medical Center Pharmacy',\n    subtitle: 'Specialty & Mail Hub',\n    address: '4760 Sunset Blvd, Los Angeles, CA 90027',\n    phone: '(323) 555-0177',\n    fax: '(323) 555-0178',\n    hours: 'Mon-Fri: 7:00 AM – 9:00 PM · Sat-Sun: 8:00 AM – 6:00 PM',\n    isDriveThru: true,\n  },\n]\n",
      "type": "registry:block",
      "target": "~/app/components/blocks/prescription-refill-manager/prescription-refill-manager-data.ts"
    },
    {
      "path": "packages/registry-vue/blocks/prescription-refill-manager/prescription-refill-manager-types.ts",
      "content": "export type PrescriptionStatus = 'ready' | 'needs_auth' | 'in_transit' | 'active'\n\nexport interface Prescription {\n  id: string\n  rxNumber: string\n  name: string\n  genericFor: string\n  dosageForm: string\n  instructions: string\n  refillsRemaining: number\n  totalRefills: number\n  lastFilledDate: string\n  nextDueDate: string\n  isDue: boolean\n  prescriber: {\n    name: string\n    specialty: string\n    clinic: string\n    phone: string\n  }\n  status: PrescriptionStatus\n  daysSupply: number\n  copayEst: number\n  ndc: string\n  packageTracking?: {\n    carrier: string\n    trackingNumber: string\n    status: string\n    estimatedArrival: string\n    steps: { title: string; time: string; done: boolean; current?: boolean }[]\n  }\n}\n\nexport interface Pharmacy {\n  id: string\n  name: string\n  subtitle: string\n  address: string\n  phone: string\n  fax: string\n  hours: string\n  isDriveThru: boolean\n}\n\nexport interface TransferFormState {\n  pharmacyName: string\n  phone: string\n  rxNumber: string\n  medicationName: string\n  notes: string\n}\n",
      "type": "registry:block",
      "target": "~/app/components/blocks/prescription-refill-manager/prescription-refill-manager-types.ts"
    }
  ],
  "dependencies": [
    "lucide-vue-next"
  ],
  "devDependencies": [],
  "registryDependencies": [
    "https://uipkge.dev/r/vue/badge.json",
    "https://uipkge.dev/r/vue/button.json",
    "https://uipkge.dev/r/vue/card.json",
    "https://uipkge.dev/r/vue/dialog.json",
    "https://uipkge.dev/r/vue/dropdown-menu.json",
    "https://uipkge.dev/r/vue/radio-group.json",
    "https://uipkge.dev/r/vue/separator.json",
    "https://uipkge.dev/r/vue/table.json"
  ],
  "description": "Pharmacy patient portal for managing active prescriptions, refill requests, dosage schedules, delivery tracking, and preferred pharmacy details with an integrated refill order dialog.",
  "categories": [
    "healthcare",
    "app"
  ]
}