import { Button } from "@/components/ui/button";
import {
Tooltip,
TooltipContent,
TooltipTrigger,
} from "@/components/ui/tooltip";
import {
PROCEDURE_COMBOS,
COMBO_CATEGORIES,
} from "@/utils/procedureCombos";
/* =========================================================
DIRECT COMBO BUTTONS (TOP SECTION)
========================================================= */
export function DirectComboButtons({
onDirectCombo,
}: {
onDirectCombo: (comboKey: string) => void;
}) {
return (
{/* Section Title */}
Direct Claim Submission Buttons
{/* CHILD RECALL */}
{/* ADULT RECALL */}
{/* ORTH */}
);
}
/* =========================================================
REGULAR COMBO BUTTONS (BOTTOM SECTION)
========================================================= */
export function RegularComboButtons({
onRegularCombo,
}: {
onRegularCombo: (comboKey: string) => void;
}) {
return (
{Object.entries(COMBO_CATEGORIES).map(([section, ids]) => (
{section}
{ids.map((id) => {
const b = PROCEDURE_COMBOS[id];
if (!b) return null;
const tooltipText = b.codes
.map((code, idx) => {
const tooth = b.toothNumbers?.[idx];
return tooth ? `${code} (tooth ${tooth})` : code;
})
.join(", ");
return (
{tooltipText}
);
})}
))}
);
}
/* =========================================================
INTERNAL HELPERS
========================================================= */
function DirectGroup({
title,
combos,
labelMap,
onSelect,
}: {
title: string;
combos: string[];
labelMap?: Record;
onSelect: (id: string) => void;
}) {
return (
{title}
{combos.map((id) => {
const b = PROCEDURE_COMBOS[id];
if (!b) return null;
const tooltipText = b.codes
.map((code, idx) => {
const tooth = b.toothNumbers?.[idx];
return tooth ? `${code} (tooth ${tooth})` : code;
})
.join(", ");
return (
{tooltipText}
);
})}
);
}