import { t } from "@lingui/core/macro"; import type z from "zod"; import type { levelDesignSchema } from "@/schema/resume/data"; import { cn } from "@/utils/style"; import { PageIcon } from "../resume/shared/page-icon"; type Props = z.infer & React.ComponentProps<"div"> & { level: number }; export function LevelDisplay({ icon, type, level, className, ...props }: Props) { if (level === 0) return null; if (type === "hidden") return null; return (
{Array.from({ length: 5 }).map((_, index) => { const isActive = index < level; if (type === "progress-bar") { return (
); } if (type === "icon") { return ( ); } return (
); })}
); }