import { Check, ChevronDown } from 'lucide-react' import { cn } from '@/lib' import { useChatStore } from '@/features/chat/stores/useChatStore' interface Props { isOpen: boolean setIsOpen: (isOpen: boolean) => void } export const STEPS = [ { name: '서비스안내', desc: '협상 방식과 유의사항을 확인합니다.' }, { name: '담당자확인', desc: '협상 담당자 본인 여부를 확인합니다.' }, { name: '협상품목안내', desc: '대상 품목과 기준 단가를 확인합니다.' }, { name: '가격협상', desc: '공급 단가를 제안하고 조율합니다.' }, { name: '협상종료', desc: '최종 합의 후 결과를 확인합니다.' }, ] export function NegoStep({ isOpen, setIsOpen }: Props) { const chats = useChatStore((s) => s.messages) const currentStep = chats[chats.length - 1]?.display_step || '서비스안내' const currentIndex = Math.max( 0, STEPS.findIndex((s) => s.name === currentStep), ) return (
{isOpen && (
{/* 세로 레일 */} {STEPS.map((step, i) => { const done = i < currentIndex const current = i === currentIndex return (
{done ? : i + 1}

{step.name}

{step.desc}

) })}
)}
) }