/* eslint-disable no-nested-ternary */ /* eslint-disable jsx-a11y/alt-text */ import Image from "next/image"; import type { ReactNode } from "react"; import br_first_normal from "@/assets/svg/breadcrumb/br_first_normal.svg"; import br_first_selected from "@/assets/svg/breadcrumb/br_first_selected.svg"; import br_last_normal from "@/assets/svg/breadcrumb/br_last_normal.svg"; import br_last_selected from "@/assets/svg/breadcrumb/br_last_selected.svg"; import br_selected from "@/assets/svg/breadcrumb/br_selected.svg"; import { cn } from "@/libs/utils"; import LIcon from "../lucid-icon/lucid-icon"; import styles from "./breadcrumb.module.css"; function BreadcrumbBackground({ steps, step, stepIndex, activeSteps, }: { steps: { key: string }[]; step: { key: string }; stepIndex: number; activeSteps: string[]; }) { const commonProps = { width: 110, height: 32, alt: "breadcrumb_normal_svg", className: "h-[32px] w-[110px]", }; let imageSrc; if (activeSteps.includes(step.key)) { if (stepIndex === 0) { imageSrc = br_first_selected; } else if (stepIndex === steps.length - 1) { imageSrc = br_last_selected; } else { imageSrc = br_selected; } } else { imageSrc = stepIndex === 0 ? br_first_normal : br_last_normal; } return ; } export const Breadcrumb = ({ steps = [], activeSteps = [], completedSteps = [], }: { steps: { key: string; label: ReactNode; }[]; completedSteps?: string[]; activeSteps: string[]; }) => { return (
); };