/**
 * Shared medical icon registry.
 * Used across the dashboard (doctor form, article form, etc.)
 * and can be imported by the frontend as well.
 *
 * Each entry has:
 *  - key     : unique machine-readable identifier stored in the DB
 *  - label   : human-readable name shown in the UI
 *  - category: grouping used for the icon picker
 */

export interface MedicalIconMeta {
  key: string
  label: string
  category: "surgery" | "body" | "treatment" | "tool" | "specialty" | "dentistry" | "general" | "article" | "contact"
}

export const MEDICAL_ICONS: MedicalIconMeta[] = [
  // Surgery
  { key: "scalpel",            label: "Scalpel",              category: "surgery"    },
  { key: "syringe",            label: "Syringe",              category: "surgery"    },
  { key: "scissors",           label: "Surgical Scissors",    category: "surgery"    },
  { key: "bandage",            label: "Bandage",              category: "surgery"    },
  { key: "needle",             label: "Suture Needle",        category: "surgery"    },
  { key: "scalpel-cut",        label: "Incision",             category: "surgery"    },
  { key: "knife",              label: "Surgical Knife",       category: "surgery"    },
  { key: "clamp",              label: "Surgical Clamp",       category: "surgery"    },
  { key: "drain",              label: "Drain",                category: "surgery"    },
  { key: "retractor",          label: "Retractor",            category: "surgery"    },
  { key: "cautery",            label: "Electrocautery",       category: "surgery"    },
  { key: "stapler",            label: "Surgical Stapler",     category: "surgery"    },

  // Body
  { key: "hair",               label: "Hair",                 category: "body"       },
  { key: "skin",               label: "Skin",                 category: "body"       },
  { key: "face",               label: "Face",                 category: "body"       },
  { key: "scalp",              label: "Scalp",                category: "body"       },
  { key: "eyebrow",            label: "Eyebrow",              category: "body"       },
  { key: "beard",              label: "Beard",                category: "body"       },
  { key: "body-outline",       label: "Body Outline",         category: "body"       },
  { key: "heart",              label: "Heart",                category: "body"       },
  { key: "brain",              label: "Brain",                category: "body"       },
  { key: "eye",                label: "Eye",                  category: "body"       },
  { key: "ear",                label: "Ear",                  category: "body"       },
  { key: "bone",               label: "Bone",                 category: "body"       },
  { key: "tooth",              label: "Tooth",                category: "dentistry"  },
  { key: "teeth",              label: "Teeth",                category: "dentistry"  },
  { key: "nose",               label: "Nose",                 category: "body"       },
  { key: "lips",               label: "Lips",                 category: "body"       },
  { key: "chest",              label: "Chest",                category: "body"       },
  { key: "spine",              label: "Spine",                category: "body"       },
  { key: "kidney",             label: "Kidney",               category: "body"       },
  { key: "lungs",              label: "Lungs",                category: "body"       },
  { key: "stomach",            label: "Stomach",              category: "body"       },
  { key: "hand",               label: "Hand",                 category: "body"       },
  { key: "foot",               label: "Foot",                 category: "body"       },
  { key: "neck",               label: "Neck",                 category: "body"       },

  // Treatment
  { key: "fue",                label: "FUE Transplant",       category: "treatment"  },
  { key: "dhi",                label: "DHI Transplant",       category: "treatment"  },
  { key: "prp",                label: "PRP Therapy",          category: "treatment"  },
  { key: "laser",              label: "Laser Treatment",      category: "treatment"  },
  { key: "mesotherapy",        label: "Mesotherapy",          category: "treatment"  },
  { key: "stem-cell",          label: "Stem Cell",            category: "treatment"  },
  { key: "graft",              label: "Graft",                category: "treatment"  },
  { key: "transplant",         label: "Transplant",           category: "treatment"  },
  { key: "restoration",        label: "Hair Restoration",     category: "treatment"  },
  { key: "rhinoplasty",        label: "Rhinoplasty",          category: "treatment"  },
  { key: "liposuction",        label: "Liposuction",          category: "treatment"  },
  { key: "facelift",           label: "Facelift",             category: "treatment"  },
  { key: "botox",              label: "Botox",                category: "treatment"  },
  { key: "filler",             label: "Filler",               category: "treatment"  },
  { key: "blepharoplasty",     label: "Blepharoplasty",       category: "treatment"  },
  { key: "abdominoplasty",     label: "Abdominoplasty",       category: "treatment"  },
  { key: "breast-augment",     label: "Breast Augmentation",  category: "treatment"  },
  { key: "gynecomastia",       label: "Gynecomastia",         category: "treatment"  },
  { key: "ear-correction",     label: "Ear Correction",       category: "treatment"  },
  { key: "chemical-peel",      label: "Chemical Peel",        category: "treatment"  },
  { key: "microneedling",      label: "Microneedling",        category: "treatment"  },
  { key: "ultherapy",          label: "Ultherapy",            category: "treatment"  },
  { key: "coolsculpting",      label: "CoolSculpting",        category: "treatment"  },

  // Tool
  { key: "microscope",         label: "Microscope",           category: "tool"       },
  { key: "stethoscope",        label: "Stethoscope",          category: "tool"       },
  { key: "x-ray",              label: "X-Ray",                category: "tool"       },
  { key: "mri",                label: "MRI / Scanner",        category: "tool"       },
  { key: "forceps",            label: "Forceps",              category: "tool"       },
  { key: "implanter-pen",      label: "Implanter Pen",        category: "tool"       },
  { key: "punch-tool",         label: "Punch Tool",           category: "tool"       },
  { key: "tablet",             label: "Tablet / Medicine",    category: "tool"       },
  { key: "dropper",            label: "Dropper",              category: "tool"       },
  { key: "thermometer",        label: "Thermometer",          category: "tool"       },
  { key: "blood-pressure",     label: "Blood Pressure",       category: "tool"       },
  { key: "ultrasound",         label: "Ultrasound",           category: "tool"       },
  { key: "endoscope",          label: "Endoscope",            category: "tool"       },
  { key: "ct-scan",            label: "CT Scan",              category: "tool"       },
  { key: "laser-device",       label: "Laser Device",         category: "tool"       },
  { key: "iv-drip",            label: "IV Drip",              category: "tool"       },
  { key: "oxygen-mask",        label: "Oxygen Mask",          category: "tool"       },

  // Specialty
  { key: "dermatology",        label: "Dermatology",          category: "specialty"  },
  { key: "plastic-surgery",    label: "Plastic Surgery",      category: "specialty"  },
  { key: "trichology",         label: "Trichology",           category: "specialty"  },
  { key: "cosmetology",        label: "Cosmetology",          category: "specialty"  },
  { key: "oncology",           label: "Oncology",             category: "specialty"  },
  { key: "orthopedics",        label: "Orthopedics",          category: "specialty"  },
  { key: "cardiology",         label: "Cardiology",           category: "specialty"  },
  { key: "neurology",          label: "Neurology",            category: "specialty"  },
  { key: "ophthalmology",      label: "Ophthalmology",        category: "specialty"  },
  { key: "dentistry",          label: "Dentistry",            category: "dentistry"  },
  { key: "dental-implant",     label: "Dental Implant",       category: "dentistry"  },
  { key: "dental-crown",       label: "Dental Crown",         category: "dentistry"  },
  { key: "teeth-whitening",    label: "Teeth Whitening",      category: "dentistry"  },
  { key: "orthodontic-braces", label: "Orthodontic Braces",   category: "dentistry"  },
  { key: "root-canal",         label: "Root Canal",           category: "dentistry"  },
  { key: "gum-treatment",      label: "Gum Treatment",        category: "dentistry"  },
  { key: "urology",            label: "Urology",              category: "specialty"  },
  { key: "gynecology",         label: "Gynecology",           category: "specialty"  },
  { key: "pediatrics",         label: "Pediatrics",           category: "specialty"  },
  { key: "gastroenterology",   label: "Gastroenterology",     category: "specialty"  },
  { key: "pulmonology",        label: "Pulmonology",          category: "specialty"  },
  { key: "endocrinology",      label: "Endocrinology",        category: "specialty"  },
  { key: "rheumatology",       label: "Rheumatology",         category: "specialty"  },
  { key: "nephrology",         label: "Nephrology",           category: "specialty"  },
  { key: "vascular",           label: "Vascular Surgery",     category: "specialty"  },
  { key: "maxillofacial",      label: "Maxillofacial",        category: "dentistry"  },

  // General
  { key: "certificate",        label: "Certificate",          category: "general"    },
  { key: "award",              label: "Award",                category: "general"    },
  { key: "research",           label: "Research",             category: "general"    },
  { key: "globe",              label: "International",        category: "general"    },
  { key: "clock",              label: "Experience",           category: "general"    },
  { key: "shield-check",       label: "Safety / Quality",     category: "general"    },
  { key: "star",               label: "Excellence",           category: "general"    },
  { key: "check-circle",       label: "Success",              category: "general"    },
  { key: "users",              label: "Patients",             category: "general"    },
  { key: "trending-up",        label: "Success Rate",         category: "general"    },
  { key: "map-pin",            label: "Location",             category: "general"    },
  { key: "calendar",           label: "Schedule",             category: "general"    },
  { key: "message-circle",     label: "Consultation",         category: "general"    },
  { key: "graduation",         label: "Education",            category: "general"    },
  { key: "article-pen",        label: "Article Pen",          category: "general"    },
  { key: "article-book",       label: "Article Book",         category: "general"    },
  { key: "article-file",       label: "Article Document",     category: "general"    },
  { key: "article-notebook",   label: "Article Notebook",     category: "article"    },
  { key: "article-news",       label: "Article News",         category: "article"    },
  { key: "article-bookmark",   label: "Article Bookmark",     category: "article"    },
  { key: "article-library",    label: "Article Library",      category: "article"    },
  { key: "article-scroll",     label: "Article Scroll",       category: "article"    },
  { key: "article-note",       label: "Article Note",         category: "article"    },
  { key: "article-edit",       label: "Article Edit",         category: "article"    },
  { key: "article-journal",    label: "Article Journal",      category: "article"    },
  { key: "article-draft",      label: "Article Draft",        category: "article"    },
  { key: "article-publish",    label: "Article Publish",      category: "article"    },
  { key: "hospital",           label: "Hospital",             category: "general"    },
  { key: "clinic",             label: "Clinic",               category: "general"    },
  { key: "phone",              label: "Phone",                category: "general"    },
  { key: "email",              label: "Email",                category: "general"    },
  { key: "language",           label: "Language",             category: "general"    },
  { key: "notes",              label: "Medical Notes",        category: "general"    },
  { key: "id-card",            label: "ID / License",         category: "general"    },
  { key: "badge",              label: "Badge",                category: "general"    },
  { key: "handshake",          label: "Partnership",          category: "general"    },
  { key: "percent",            label: "Discount / Rate",      category: "general"    },
  { key: "expert-doctors",     label: "Expert Doctors",       category: "general"    },
  { key: "support-24-7",       label: "24/7 Support",         category: "general"    },
  { key: "full-package",       label: "Full Package",         category: "general"    },
  { key: "travel-arranged",    label: "Travel Arranged",      category: "general"    },
  { key: "treatment-care",     label: "Treatment and Care",   category: "general"    },
  { key: "post-treatment-care", label: "Post-Treatment Care and Follow-up", category: "general" },
  { key: "safe-lock",          label: "Safe Lock",            category: "general"    },
  { key: "safe-shield",        label: "Safe Shield",          category: "general"    },
  { key: "secure-key",         label: "Secure Key",           category: "general"    },
  { key: "lightbulb",          label: "Lightbulb",            category: "general"    },
  { key: "bulb",               label: "Bulb",                 category: "general"    },
  { key: "tech-cpu",           label: "AI Processor",         category: "general"    },
  { key: "tech-database",      label: "Data Platform",        category: "general"    },
  { key: "tech-wifi",          label: "Smart Connectivity",   category: "general"    },
  { key: "tech-mobile",        label: "Mobile Technology",    category: "general"    },
  { key: "tech-monitor",       label: "Digital Monitoring",   category: "general"    },
  { key: "tech-ai",            label: "AI Assistant",         category: "general"    },
  { key: "personalized-care-plans", label: "Personalized Care Plans", category: "general" },
  { key: "transparent-outcomes", label: "Transparent Outcomes", category: "general" },
  { key: "calculator",         label: "Calculator",           category: "general"    },
  { key: "globe-lines",        label: "Globe Lines",          category: "contact"    },
  { key: "globe-orbit",        label: "Globe Orbit",          category: "contact"    },
  { key: "globe-radar",        label: "Globe Radar",          category: "contact"    },
  { key: "globe-earth",        label: "Globe Earth",          category: "contact"    },
  { key: "globe-planet",       label: "Globe Planet",         category: "contact"    },
  { key: "globe-network",      label: "Globe Network",        category: "contact"    },
  { key: "globe-network-outline", label: "Globe Network Outline", category: "contact" },
  { key: "internet-globe",     label: "Internet Globe",       category: "contact"    },
  { key: "bed",                label: "Bed",                  category: "general"    },
  { key: "overweight",         label: "Overweight",           category: "general"    },
  { key: "heavy-weights",      label: "Heavy Weights",        category: "general"    },
  { key: "graduation-cap",     label: "Graduation Cap",       category: "general"    },
  { key: "money-dollar",       label: "Money Dollar",         category: "general"    },
  { key: "money-coins",        label: "Money Coins",          category: "general"    },
  { key: "money-wallet",       label: "Money Wallet",         category: "general"    },

  // Contact & Social
  { key: "phone-call",         label: "Phone Call",           category: "contact"    },
  { key: "phone-incoming",     label: "Incoming Call",        category: "contact"    },
  { key: "whatsapp",           label: "WhatsApp",             category: "contact"    },
  { key: "mail-open",          label: "Mail Open",            category: "contact"    },
  { key: "inbox",              label: "Inbox",                category: "contact"    },
  { key: "send",               label: "Send Message",         category: "contact"    },
  { key: "chat-bubble",        label: "Chat",                 category: "contact"    },
  { key: "video-call",         label: "Video Call",           category: "contact"    },
  { key: "headset",            label: "Support / Headset",    category: "contact"    },
  { key: "instagram",          label: "Instagram",            category: "contact"    },
  { key: "facebook",           label: "Facebook",             category: "contact"    },
  { key: "twitter-x",         label: "X / Twitter",          category: "contact"    },
  { key: "youtube",            label: "YouTube",              category: "contact"    },
  { key: "tiktok",             label: "TikTok",               category: "contact"    },
  { key: "linkedin",           label: "LinkedIn",             category: "contact"    },
  { key: "snapchat",           label: "Snapchat",             category: "contact"    },
  { key: "telegram",           label: "Telegram",             category: "contact"    },
  { key: "website",            label: "Website",              category: "contact"    },
  { key: "globe-wireframe",    label: "Globe Wireframe",      category: "contact"    },
  { key: "globe-grid",         label: "Globe Grid",           category: "contact"    },
  { key: "globe-classic",      label: "Globe Classic",        category: "contact"    },
  { key: "link",               label: "Link",                 category: "contact"    },
  { key: "qr-code",            label: "QR Code",              category: "contact"    },
  { key: "address",            label: "Address",              category: "contact"    },
  { key: "building",           label: "Building / Office",    category: "contact"    },
  { key: "directions",         label: "Directions",           category: "contact"    },
  { key: "navigation",         label: "Navigation",           category: "contact"    },
  { key: "pin-drop",           label: "Pin Drop",             category: "contact"    },
  { key: "flag",               label: "Country / Flag",       category: "contact"    },
  { key: "earth",              label: "Earth / World",        category: "contact"    },
  { key: "open-hours",         label: "Open Hours",           category: "contact"    },
  { key: "appointment",        label: "Appointment",          category: "contact"    },
  { key: "form",               label: "Contact Form",         category: "contact"    },
]

/** Fast lookup by key */
export function getMedicalIcon(key: string): MedicalIconMeta | undefined {
  return MEDICAL_ICONS.find((i) => i.key === key)
}

/** All unique categories */
export const MEDICAL_ICON_CATEGORIES = [
  "surgery",
  "body",
  "treatment",
  "tool",
  "specialty",
  "dentistry",
  "general",
  "article",
  "contact",
] as const

export type MedicalIconCategory = (typeof MEDICAL_ICON_CATEGORIES)[number]
